Image encoding device, image encoding method, image decoding device, image decoding method, program, and storage medium

ABSTRACT

A prediction set determining section selects a prediction set from a prediction set group including a plurality of prediction sets having different combinations of prediction modes corresponding to different prediction directions. Further, a prediction mode determining section selects a prediction mode from the prediction set thus selected. An entropy encoding section encodes the prediction set thus selected, the prediction mode thus selected, and residual data between an input image and a predicted image formed on the basis of the prediction set and the prediction mode. This allows an image encoding device to carry out predictions from more various angles, thereby improving prediction efficiency.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Divisional of co-pending application Ser. No.12/667,004, filed on Dec. 28, 2009, which is a National Phase ofPCT/JP2008/061672 filed on Jun. 26, 2008, and for which priority isclaimed under 35 U.S.C. §120; and these applications claim priority ofApplication No. JP-2007-268429 filed in Japan on Oct. 15, 2007, andJP-2007-173379 filed in Japan on Jun. 29, 2007 under 35 U.S.C. §119; theentire contents of all are hereby expressly incorporated by referenceinto the present application.

TECHNICAL FIELD

The present invention relates to an image encoding device, an imageencoding method, a program, and a storage medium, each for encoding animage. The present invention also relates to an image decoding device,an image decoding method, a program, and a storage medium, each fordecoding an encoded image.

BACKGROUND ART

Image encoding techniques have been applied to many video devices thatare familiarly used. Target products to which the techniques are appliedmay be, for example, DVD for enjoying video contents, such as movies,hard disk recorders in which video contents, such as TV broadcasts, areto be recorded, digital TV encoding systems, DVD cameras, and mobilephones that can carry out image processing. As such, the image encodingtechniques are applied very widely.

Non Patent Literature 1 discloses (i) an image encoding device thatencodes an image by use of a spatial correlation or a temporalcorrelation in the image, and (ii) an image decoding device that decodesencoded data that is encoded by the image encoding device. The followingexplains about techniques of these devices that use the spatialcorrelation, with reference to FIGS. 65 through 70.

(Arrangement of Image Encoding Device 300)

With reference to FIG. 65, the following describes an image encodingdevice 300 according to a conventional technique.

FIG. 65 is a block diagram showing essential part of an arrangement ofthe image encoding device 300 according to the conventional technique.The image encoding device 300 includes a difference computing section 1,an orthogonal transformation section 2, a quantization section 3, anentropy encoding section 304, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 310, and a predictionmode determining section 311 (FIG. 65). The following describes each ofthe constituent components of the image encoding device 300.

(Difference Computing Section 1)

The difference computing section 1 outputs prediction residual data,which is a difference between a target block to be encoded (M×M pixelblock) and a predicted image generated from the intra prediction section310.

(Orthogonal Transformation Section 2 and Inverse OrthogonalTransformation Section 7)

The orthogonal transformation section 2 carries out orthogonaltransformation with respect to the prediction residual data receivedfrom the difference computing section 1, and then outputs the resultant.The inverse orthogonal transformation section 7 carries out inverseorthogonal transformation with respect to an orthogonal transformcoefficient of the prediction residual data received from the inversequantization section 6, and outputs the resultant. As a method of theorthogonal transformation and the inverse orthogonal transformation,discrete cosine transform, Hadamard transform, discrete Fouriertransform, discrete sine transform, Haar transform, slant transform, orKarhunen-Loeve transform can be used.

(Quantization Section 3 and Inverse Quantization Section 6)

The quantization section 3 carries out quantization with respect to anorthogonal transformation coefficient of the prediction residual datareceived from the orthogonal transformation section 2, and then outputsthe resultant. The inverse quantization section 6 carries out inversequantization with respect to a quantization coefficient of theprediction residual data received from the quantization section 3, andthen outputs the resultant. The quantization and the inversequantization are carried out by use of scalar quantization or vectorquantization.

(Entropy Encoding Section 304)

The entropy encoding section 304 carries out entropy encoding withrespect to the prediction residual data and information on an encodingmode, such as a block type, prediction mode information, and aquantization parameter. The “entropy encoding” indicates: (a) variablelength coding, such as arithmetic coding, Huffman coding, and Golombcoding; or (b) fixed length coding.

(Addition Computing Section 8)

The addition computing section 8 adds the prediction residual datasubjected to the inverse quantization and the inverse orthogonaltransformation, to a predicted image generated by the intra predictionsection 310 so as to generate a locally decoded image. The additioncomputing section 8 then output the locally decoded image.

(Memory 9)

The memory 9 receives and then stores the locally decoded image therein.

(Intra Prediction Section 310)

The intra prediction section 310 carries out intra prediction indicatedby prediction mode information, by use of a locally decoded image storedin the memory 9, and generates a predicted image. The “intra prediction”indicates prediction in a screen or prediction in a frame, that is,prediction carried out by use of a spatial correlation in the image. Atthis time, the intra prediction is carried out on a target block (M×Mpixel block) to be encoded, by use of 9 types of predeterminedprediction methods respectively indicated by Modes 0 through 8. FIG. 66shows examples of prediction modes. FIG. 66 shows prediction modes foruse in the intra prediction according to the conventional technique. Inthe examples in FIG. 66, a block size is a 4×4 pixel block. Further,pixels A through M are pixels which have been already encoded and whichare used for prediction of the target block to be encoded.

The following describes each of the modes more specifically. Mode 0carries out a spatial prediction toward a vertical direction with theuse of the pixels A through D. Mode 1 carries out the spatial predictiontoward a horizontal direction with the use of the pixels I through L.Prediction Mode 2 carries out a DC prediction with the use of the pixelsA through D and the pixels I through L. Mode 3 carries out the spatialprediction toward a diagonal down left direction with the use of thepixels A through H. Mode 4 carries out the spatial prediction toward adiagonal down right direction with the use of the pixels A through D andthe pixels I through M. Mode 5 carries out the spatial prediction towarda vertical right direction with the use of the pixels A through D, thepixels I through K, and the pixel M. Mode 6 carries out the spatialprediction toward a horizontal down direction with the use of the pixelsA through C and the pixels I through M. Mode 7 carries out the spatialdirection toward a vertical left direction with the use of the pixels Athrough E. Mode 8 carries out the spatial prediction toward a horizontalup direction with the use of the pixels I, J, K, and L. The intraprediction section 310 generates prediction pixels by use of aprediction method corresponding to any one of the modes.

(Prediction Mode Determining Section 311)

The prediction mode determining section 311 determines which one of theplurality of prediction modes shown in FIG. 66 is to be used forprediction of the target block to be encoded, based on an inputtedoriginal image of the target block to be encoded and a locally decodedimage received from the memory 9, and supplies information on adetermined prediction mode (hereinafter referred to as prediction modeinformation) to the intra prediction section 310 and the entropyencoding section 304.

Generally, a method for evaluating a prediction residual cost(hereinafter referred to as a prediction residual cost minimizationmethod) or a rate distortion optimization method is used for determininga prediction mode to be used.

The prediction residual cost minimization method is a method in which(i) a degree of similarity (hereinafter referred to as a predictionresidual cost) is found between the inputted original image of thetarget block to be encoded and a predicted image corresponding to eachof the prediction modes, generated on the basis of a locally decodedimage received from the memory 9, and then (ii) a prediction mode havingthe smallest prediction residual cost is selected among the predictionmodes. A measure S of the prediction residual cost is represented by anyone of the followings: a sum of absolute values of prediction residualdata; a square sum of prediction residual data; a sum of absolute valuesof transform coefficients of prediction residual data; and a square sumof transform coefficients of prediction residual data. These values arecalculated by use of the following equations (1) through (4).

$\begin{matrix}{{Math}.\mspace{14mu} 1} & \; \\{S = {\sum\limits_{i,{j \in {block}}}^{\;}\;{{{f\left( {{x + i},{y + j}} \right)} - {p\left( {{x + i},{y + j}} \right)}}}}} & (1) \\{S = {\sum\limits_{i,{j \in {block}}}^{\;}\;\left\{ {{f\left( {{x + i},{y + j}} \right)} - {p\left( {{x + i},{y + j}} \right)}} \right\}^{2}}} & (2) \\{S = {\sum\limits_{i,{j \in {block}}}^{\;}\;{{T\left\{ {{f\left( {{x + i},{y + j}} \right)} - {p\left( {{x + i},{y + j}} \right)}} \right\}}}}} & (3) \\{S = {\sum\limits_{i,{j \in {block}}}^{\;}\;{T\left\{ {{f\left( {{x + i},{y + j}} \right)} - {p\left( {{x + i},{y + j}} \right)}} \right\}^{2}}}} & (4)\end{matrix}$

In the equations (1) through (4), f(x, y) indicates an original image,p(x, y) indicates a predicted image, x and y indicate a target block tobe encoded, and i and j indicate a position of a pixel in the targetblock to be encoded. T{ } indicates an orthogonal transformationoperation, such as discrete cosine transform, discrete sine transform,and Hadamard transform.

In the rate distortion optimization method, a prediction mode isselected according to the following steps. Initially, predicted imagescorresponding to the respective prediction modes are generated on thebasis of a locally decoded image received from the memory 9. Then,prediction residual data is found from each of the predicted images thusgenerated and the inputted original image of the target block to beencoded. Subsequently, the prediction residual data thus obtained istemporarily encoded. Then, (a) a prediction error D between the originalimage of the target block and a decoded image of the target block and(b) an encoding amount R necessary for encoding the target block arecalculated with respect to each of the prediction modes. Finally, aprediction mode that minimizes an encoding cost J calculated accordingto the following equation (5) based on D and R, is selected from theprediction modes.

Math. 2J(mode|q)=D(mode|q)+λ(q)·R(mode|q)  (5)

The prediction error D is an error between prediction residual data thathas not been quantized and prediction residual data that has quantized.The encoding amount R is a total of an encoding amount of predictionresidual data and an encoding amount of prediction mode information.

In the equation (5), “mode” indicates a prediction mode, and q indicatesa quantization parameter. Further, λ is a weighting factor dependent onthe quantization parameter q, and is generally calculated according tothe following equation (6):

Math. 3λ(q)=0.85×2^((q-12)/3)  (6)

(Encoding Process of Image Encoding Device 300)

The following describes how the image encoding device 300 operates.

Initially, a target image to be encoded (hereinafter referred to as atarget block to be encoded), which is divided into blocks by apredetermined block size (M×M pixel block), is supplied to the imageencoding device 300, as an input image.

The prediction mode determining section 311 determines a prediction modeto be used for prediction for the target block to be encoded, inaccordance with the prediction residual cost minimization method or therate distortion optimization method, based on the target block to beencoded and a locally decoded image of an adjacent block that has beenalready encoded, which locally decoded image is received from the memory9. The prediction mode determining section 311 then supplies predictionmode information to the intra prediction section 310 and the entropyencoding section 304.

The intra prediction section 310 carries out intra prediction indicatedby the prediction mode information thus received, based on the locallydecoded image of the adjacent block that has been encoded, which locallydecoded image is received from the memory 9, so as to generate apredicted image (M×M pixel block) of the target block to be encoded. Theintra prediction section 310 then supplies the predicted image to thedifference computing section 1.

Subsequently, the difference computing section 1 calculates predictionresidual data that is a difference between the target block to beencoded and the predicted image thus generated, and supplies theprediction residual data to the orthogonal transformation section 2.

The prediction residual data from the difference computing section 1 issupplied to the orthogonal transformation section 2 and then to thequantization section 3 so as to be subjected to orthogonaltransformation and then quantization. The prediction residual data isthen supplied to the entropy encoding section 304 and to the inversequantization section 6.

The prediction residual data thus subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization section 6 and then to the inverse orthogonal transformationsection 7 so as to be subjected to inverse quantization and inverseorthogonal transformation, respectively. The prediction residual data isthen supplied to the addition computing section 8.

The addition computing section 8 combines the prediction residual datathus subjected to the inverse quantization and the inverse orthogonaltransformation, with the predicted image corresponding to the predictionmode applied to the target block, so as to synthesize a locally decodedimage (M×M pixel block) of the target block. The locally decoded imagethus synthesized is then supplied to the memory 9.

The locally decoded image of the target block, which is supplied fromthe addition computing section 8, is stored in the memory 9, and is usedfor intra prediction of an adjacent block to be encoded subsequently tothe target block.

The entropy encoding section 304 carries out an encoding process, suchas variable length coding, with respect to encode parameters, such asthe prediction mode information, received from the prediction modedetermining section 311 and the prediction residual data subjected tothe orthogonal transformation and the quantization. Subsequently, theentropy encoding section 304 outputs encoded data of the target block.

The image encoding device 300 repeats the above process with respect toall target blocks to be encoded, which constitute a target image to beencoded.

As described above, the image encoding device 300 selects acorresponding one of the 9 types of predetermined prediction methodsfrom Modes 0 through 8 illustrated in FIG. 66, depending on acharacteristic of an image. This can attain high encoding efficiency.More specifically, the DC prediction of Mode 2 is effective forprediction for a planar image region. Further, Modes 0, 1, and 3 through8 are effective for prediction for an image including an edge in aspecific direction.

(a) and (b) of FIG. 67 illustrate concrete examples of the intraprediction in the image encoding device 300. (a) of FIG. 67 illustratesan example in which prediction residual data F43 is obtained as adifference between (i) an image F41 having vertical stripes in whichedges are formed in a vertical direction and (ii) a predicted image F42generated, based on a decoded image, according to a vertical directionprediction (Mode 0 in FIG. 66). Further, (b) of FIG. 67 illustrates anexample in which prediction residual data F46 is obtained as adifference between (i) an image F44 having diagonal stripes in whichedges are formed in a diagonal right direction and (ii) a predictedimage F45 generated, based on a decoded image, according to a diagonaldown right direction prediction (Mode 4 in FIG. 66).

In the cases of (a) and (b) of FIG. 67, the predicted images F42 andF45respectively reproduce patterned parts in the images F41 and F44,which are the original images. Therefore, when a difference between theoriginal image and the predicted image is calculated, the patterned partin the original image and the patterned part in the predicted imagecancel each other out. As a result, pixels, in the original image, whichcannot be subtracted by the predicted image remains as predictionresidual data. In (a) and (b) of FIG. 67, a prediction direction isidentical with a direction of the pattern in the original image.Consequently, it is possible to effectively reduce the predictionresidual data.

(Predictive Encoding Method of Prediction Mode Information)

The following deals with a predictive encoding method of prediction modeinformation.

The intra prediction of a 4×4 pixel block or a 8×8 pixel block in theimage encoding device using a spatial correlation, disclosed in NonPatent Literature 1, uses the 9 types of prediction modes as illustratedin FIG. 68. In Non Patent Literature 1, when prediction mode informationof a target block (B1) is encoded, an estimation value is determined insuch a manner that (a) a value of a prediction mode applied to a blockB2, which is adjacently positioned on the left side of the block B1, and(b) a value of a prediction mode applied to a block B4, which isadjacently positioned on the upper side of the block B1, are compared,and the prediction mode having a smaller value between them is taken asthe estimation value. Then, the estimation value is compared with avalue of a prediction mode of the block B1. If the values are identical,a flag “1” is encoded. In the other cases, a flag “0” and relativeprediction mode information indicative of which one of the remaining 8types of prediction modes (i.e., the prediction modes except for theestimation value) corresponds to the prediction mode of the block B1 areencoded.

Further, in Patent Literature 1, when the prediction mode information ofthe target block is encoded, a prediction mode applied to the targetblock is estimated by use of an estimation value 1 determined by theafter-mentioned first prediction means and an estimation value 2determined by the after-mentioned second prediction means.

The first prediction means determines, as the estimation value 1, aprediction mode that is most used among prediction modes applied to (i)blocks in an encoded region C2 (for example, a macro block, a slice)which is positioned on the left side of a target block C1, oralternatively (ii) blocks in an encoded region C3 which is positioned onthe upper side of the target block C1. Further, the second predictionmeans uses a decoded image in an L-shaped region B5 (a shaded part withdiagonal down-right lines) on encoded blocks B2, B3 and B4 which areadjacent to a target block B1, as illustrated in FIG. 69. Morespecifically, predicted images corresponding to 9 types of intraprediction methods shown in FIG. 68 are generated with respect to adecoded image of an L-shaped region B6 (a shaded part with diagonaldown-left lines), with the use of the decoded image of the L-shapedregion B5. Then, a prediction mode whose difference between the decodedimage of the L-shaped region B6 and the predicted image is smallestamong those prediction modes is regarded as an estimation value 2.

(Arrangement of Image Decoding Device 350)

Finally, a conventional image decoding device is described as below withreference to FIG. 71. FIG. 71 is a block diagram showing an arrangementof a conventional image decoding device 350. The image decoding device350 includes an inverse quantization section 6, an inverse orthogonaltransformation section 7, an addition computing section 8, a memory 9,an entropy decoding section 305, and an intra prediction section 310(FIG. 71). Among these constituent components, the inverse quantizationsection 6, the inverse orthogonal transformation section 7, the additioncomputing section 8, the memory 9, and the intra prediction section 310have been described above. Therefore, the following deals with only theentropy decoding section 305.

(Entropy Decoding Section 305)

The entropy decoding section 305 carries out a decoding process (forexample, a variable length decoding process) with respect to encodeddata indicative of prediction residual data of a target block to bedecoded and encode parameters, such as prediction mode information, ofthe target block to be decoded.

(Decoding Process of Image Decoding Device 350)

The following describes a decoding process of an image in the imagedecoding device 350. Initially, the entropy decoding section 305 carriesout entropy decoding with respect to received encoded data of the targetblock to be decoded, and outputs prediction residual data of the targetblock to be decoded and encode parameters, such as prediction modeinformation, of the target block to be decoded. The prediction residualdata thus decoded is supplied to the inverse quantization section 6 andthen to the inverse orthogonal transformation section 7 so as to besubjected to inverse quantization and inverse orthogonal transformation,respectively.

Then, the intra prediction section 310 generates a predicted image (M×Mpixel block) of the target block to be decoded with the use of a locallydecoded image, stored in the memory 9, of an adjacent block that hasbeen already decoded.

Subsequently, the addition computing section 8 adds the predictionresidual data thus subjected to the inverse quantization and the inverseorthogonal transformation, to the predicted image generated by the intraprediction section 310, so as to generate a decoded image of the targetblock. The memory 9 stores the decoded image (M×M pixel block) thusgenerated therein. The stored decoded image is used for intra predictionof an adjacent block(s). The image decoding device 350 repeats the aboveprocess with respect to all target blocks to be decoded, whichconstitute a target image to be decoded.

CITATION LIST Non Patent Literature 1

ISO/IEC 14496-10:2004 Advanced Video Coding

Non Patent Literature 2

Asker M. Bazen, Sabih H. Gerez. “Systematic Methods for the Computationof the Directional Fields and Singular Points of Fingerprints”, IEEETrans. On Pattern Analysis and Machine Intelligence, Vol. 24, No. 7 Jul.2002

Patent Literature 1

Japanese Patent Application Publication, Tokukai, No. 2007-116351 A(Publication Date: May 10, 2007)

SUMMARY OF INVENTION

The intra prediction in the conventional image encoding device 300causes a problem that efficiency in prediction decreases. The concreteexamples of this problem are illustrated in (a) and (b) of FIG. 72. (a)of FIG. 72 illustrates an example in which prediction residual data F53is obtained as a difference between an image F51 having vertical stripesand a predicted image F52 generated, based on a decoded image, accordingto a vertical direction prediction (Mode 0 in FIG. 66). Further, (b) ofFIG. 72 illustrates an example in which prediction residual data F56 isobtained as a difference between (i) an image F54 having diagonalstripes in which edges are formed in a diagonal right direction and (ii)a predicted image F55 generated, based on a decoded image, according toa diagonal down right direction prediction (Mode 4 in FIG. 66).

In either of the cases of (a) and (b) of FIG. 72, the predicted imageF52 or F55 reproduces only a part of a patterned part in the image F51or F54, which is the original image. Further, pixels that are not formedin the original image are formed in the predicted image. Consequently,resultant prediction residual data includes not only pixels that cannotbe subtracted by the prediction image, but also the pixels that are notformed in the original image.

A prediction residual cost of the prediction residual data F43 in (a) ofFIG. 67 is “1275” according to the equation (1). On the other hand, aprediction residual cost of the prediction residual data F53 in (a) ofFIG. 72 is “5355”. That is, the latter one is larger.

Further, a prediction residual cost of the prediction residual data F43in (b) of FIG. 67 is “765”. On the other hand, a prediction residualcost of the prediction residual data F56 in (b) of FIG. 72 is “4845”.That is, when these costs are compared by use of their sums of absolutevalues, it is found that the latter one is larger.

Generally, the more the prediction residual cost becomes, the more theencoding amount necessary for encoding the prediction residual dataincreases. As a result, in the cases of (a) and (b) of FIG. 72, theefficiency in prediction decreases.

More specifically, the conventional image encoding device has a problemthat the efficiency in prediction decreases in cases where a directionof a pattern (edge) of a target image to be predicted is different fromany of the prediction directions of the prediction methods Mode 0through 8.

The present invention is accomplished in view of the above problem. Amain object of the present invention is to provide an image encodingdevice, an image encoding method, a program, and a storage medium, eachof which can carry out predictions from more various angles, therebyimproving the efficiency in prediction. Further, another object of thepresent invention is to provide an image decoding device and an imagedecoding method, each of which decodes an image encoded by use of any ofthe image encoding device, the image encoding method, the program, andthe storage medium.

In the case of Non Patent Literature 1, an estimation value of aprediction mode depends on which value is smaller between the values ofthe prediction modes of the adjacent blocks. Therefore, in FIG. 69, itcannot be arbitrarily determined which is selected as the estimationvalue for the target block B1, (a) the prediction mode of the left blockB2 or (b) the prediction mode of the upper block B4, either of which isadjacent to the target block B1. As a result, the correlations betweenthe target block B1 and the adjacent blocks B2 and B4 cannot be utilizedsufficiently, and therefore prediction accuracy is low, which increasesthe encoding amount necessary for the prediction mode of the targetblock B1.

This problem is described below with reference to FIG. 73. Morespecifically, the problem is described with an example in which fixedlength coding is carried out by 4 bits in total, that is, (i) 3 bits ofrelative prediction mode information indicative of which one correspondsto a prediction mode of a target block, among the remaining 8 types ofprediction modes (the prediction modes except for the estimation value,in FIG. 68), and (ii) 1 bit of either a flag “1” if the prediction modeof the target block is identical with an estimation value or a flag “0”if the prediction mode is not identical with the estimation value.

FIG. 73 illustrates an example in which predictive encoding is carriedout where a prediction mode of a target block D1 is “5”, a predictionmode of an adjacent left block D2 is “5”, and a prediction mode of anadjacent upper block D3 is “3”. In FIG. 73, an estimation value of aprediction mode for the target block D1 is “3”, which is a smaller valuebetween the prediction modes of the left block D2 and the upper blockD3. Since the estimation value is different from the prediction mode ofthe target block, encoding of the prediction mode “5” of the targetblock D1 requires 4 bits. However, if the prediction mode “5” of theleft block D2 can be selected as the estimation value, the encodingamount is just 1 bit.

In Patent Literature 1, in order that the first prediction meansdetermines an estimation value 1, it is necessary to store and retainall prediction modes that are used in the encoded region C2 or C3,illustrated in FIG. 70, which requires more memory. Moreover, as hasbeen described above, in order that the second prediction meansdetermines an estimation value 2, it is necessary to generate thepredicted images again according to the intra prediction methods shownin FIG. 68 and to calculate differences between the predicted images andthe decoded image. This causes a problem that a calculation amountincreases.

The present invention is accomplished in view of these problems. A mainobject of the present invention is to provide an image encoding device,an image decoding device, an image encoding method, an image decodingmethod, a program, and a storage medium, each of which can efficientlyreduce an encoding amount related to a prediction mode.

In order to achieve the above object, a first image encoding deviceaccording to the present invention is an image encoding device forencoding an input image and includes: first selecting means forselecting one prediction set per predetermined unit of the input imagefrom a prediction set group including a plurality of prediction setseach including a plurality of different prediction modes correspondingto respective prediction directions and respective prediction methods;second selecting means for selecting one prediction mode per sub blockin a predetermined unit from a plurality of prediction modes included ina prediction set selected by the first selecting means for thepredetermined unit; predicting means for forming a predicted image persub block by use of the prediction set thus selected for thepredetermined unit and the prediction mode thus selected per sub block;and encoding means for encoding residual data between the input imageand a predicted image, the prediction set thus selected for thepredetermined unit, and the prediction mode thus selected per sub block.

In the arrangement, the image encoding device selects a prediction setand a prediction mode from a prediction set group including a pluralityof prediction sets having different combinations of a plurality ofprediction modes corresponding to different prediction directions. Theimage encoding device then encodes an image by use of the prediction setand prediction mode thus selected. The arrangement allows the imageencoding device to carry out predictions from more various angles thanthe conventional technique, thereby successfully reducing an encodingamount of the image and improving image quality.

Further, in the image encoding device, a prediction mode is expressed ina hierarchical manner with prediction set information and predictionmode information. As a result, a prediction method can be selected in amore flexible manner, thereby making it advantageously possible toprevent an increase in an encoding amount necessary for the predictionmethod and to improve efficiency in prediction.

In order to achieve the above object, an image encoding method accordingto the present invention is an image encoding method for encoding aninput image and includes: the first selecting step of selecting oneprediction set per predetermined unit of the input image from aprediction set group including a plurality of prediction sets eachincluding a plurality of different prediction modes corresponding torespective prediction directions and respective prediction methods; thesecond selecting step of selecting one prediction mode per sub blockincluded in a predetermined unit from a plurality of prediction modesincluded in a prediction set selected for the predetermined unit in thefirst selecting step; the predicting step of forming a predicted imageper sub block by use of the prediction set thus selected for thepredetermined unit and the prediction mode thus selected per sub block;and the encoding step of encoding residual data between the input imageand a predicted image, the prediction set thus selected for thepredetermined unit, and the prediction modes thus selected per subblock.

With the arrangement, it is possible to obtain the same effects as thefirst image encoding device according to the present invention.

It is preferable that a second image encoding device according to thepresent invention further include calculating means for calculating edgeinformation at least on an edge orientation of an edge per constituentimage of the input image.

In the arrangement, the image encoding device calculates edgeinformation per predetermine unit image constituting an image. As theedge information, an edge orientation of the image and/or an edgestrength of the image, or distribution information thereof are/iscalculated, for example. That is, the second image encoding deviceselects, from a prediction set group, a prediction set suited to theedge information thus calculated and then selects a prediction modesuited to the edge information from the prediction set thus selected.For example, in the case where the edge information indicates that theedge inclines in a horizontal direction, the second image encodingdevice carries out encoding by use of a prediction set that focuses onpredictions in the horizontal direction. On the other hand, in the casewhere the edge orientation indicates that the edge inclines in avertical direction, the second image encoding device carries outencoding by use of a prediction set that focuses on predictions in thevertical direction.

As such, the second image encoding device encodes an image by use of aprediction set most suited to edge information of the image. As aresult, it is possible to carry out predictions from more various anglesthan the conventional technique, thereby successfully reducing anencoding amount of the image and improving image quality.

It is preferably that a second image encoding method according to thepresent invention further include the calculating step of calculatingedge information at least on an edge orientation of an edge perconstituent image of the input image.

With the arrangement, it is possible to obtain the same effects as thesecond image encoding device according to the present invention.

It is preferable a third image encoding device according to the presentinvention further include setting means for setting a prediction set anda prediction mode, based on the edge information, respectively from theplurality of prediction sets included in the prediction set group andfrom a plurality of different prediction modes included in theprediction set thus set; and encoding means for encoding information ona prediction direction and a prediction method corresponding to theprediction mode thus set in the prediction set thus set.

In the above arrangement, the image encoding device calculates edgeinformation per constituent frame of an image. For example, as the edgeinformation, an edge orientation of the image and/or an edge strength ofthe image, or distribution information thereof are/is calculated. Theimage encoding device determines a plurality of prediction directionsefficiently approximate to the edge orientation based on thedistribution information on the edge orientation, so as to determine acombination of prediction modes in each prediction set.

For example, in the case where the distribution information on the edgeorientation indicates that edges are formed mainly in a horizontaldirection, a plurality of prediction sets each having a combination ofoptimal prediction modes in which predictions in the horizontaldirection are set finely and predictions in a vertical direction are setroughly are automatically determined. Then, the image encoding deviceencodes the image by changing a prediction set from the plurality ofprediction sets suited to the predictions in the horizontal direction,depending on an edge orientation of a target block to be encoded. On theother hand, in the case where the distribution information on the edgeorientation indicates that edges are formed mainly in a verticaldirection, a plurality of prediction sets having a combination ofoptimal prediction modes in which predictions in the vertical directionare set finely and predictions in the horizontal direction are setroughly are automatically determined.

Then, the image encoding device can encode the image by changing aprediction set from the plurality of prediction sets suited to thepredictions in the vertical direction, depending on an edge orientationof a target block to be encoded.

That is, the image encoding device forms a plurality of prediction setsby automatically combining prediction modes in each of the plurality ofprediction sets according to an image so that the plurality ofprediction sets are optimal to the image, and selects a prediction setsuitable for an edge orientation of a target block to be encoded fromthe plurality of prediction sets. This makes it advantageously possibleto more improve efficiency in prediction than a case where apredetermined prediction set is used.

It is preferable that a third image encoding method according to thepresent invention include: the setting step of setting a prediction setand a prediction mode, based on the edge information, respectively fromthe plurality of prediction sets included in the prediction set groupand from a plurality of different prediction modes included in theprediction set thus set; and the encoding step of encoding informationon respective prediction directions and respective prediction methodscorresponding to the prediction modes thus set in the prediction setthus set.

With the arrangement, it is possible to obtain the same effects as thethird image encoding device according to the present invention.

In order to achieve the above object, a first image decoding deviceaccording to the present invention is an image decoding device fordecoding encoded data of an image and includes: decoding means fordecoding, from the encoded data, (i) a prediction set per predeterminedunit of the image according to prediction sets each including aplurality of prediction modes corresponding to different predictiondirections and different prediction methods, and (ii) a prediction modeand residual data each per sub block included in a predetermined unit;predicting means for forming a predicted image per sub block by use of aprediction set decoded for the predetermined unit and the predictionmode thus decoded per sub block; and adding means for adding theresidual data thus decoded per sub block and the predicted image thusformed per sub block.

In the arrangement, the image decoding device includes a prediction setgroup including a plurality of prediction sets having differentcombinations of a plurality of prediction modes corresponding todifferent prediction directions. The image decoding device decodesprediction set information indicative of which prediction set in aprediction set group is applied to a target block to be decoded, whichis a constituent image of an image, from the prediction set group on thebasis of relative prediction set information and prediction setinformation that has been already decoded. Then, the image decodingdevice carries out intra prediction with respect to a target sub blockconstituting the target block (the target block is subdivided into subblocks), by use of a locally decoded image of a sub block adjacent tothe target sub block. The intra prediction thus carried out is definedby the prediction set information to be applied to all the sub blocks inthe target block and prediction mode information decoded for the targetsub block. The image decoding device then generates a predicted image ofthe target sub block and combines the predicted image and decodedprediction residual data of the target sub block, so as to reconstructan image of the target sub block.

For example, in the case where the prediction set information indicatesa prediction set that focuses on predictions in a horizontal direction,it is possible to generate predicted images from more specific angleswith the horizontal direction as a center. Further, in the case wherethe prediction set information indicates a prediction set that focuseson predictions in a vertical direction, it is possible to generatepredicted images from more specific angles with the vertical directionas a center.

This arrangement allows the image decoding device to carry out adecoding process by use of predictions from more various angles than theconventional technique, thereby reproducing an edge portion moreefficiently. As a result, it is advantageously possible to improve imagequality.

Further, the image decoding device carries out prediction at two stagesof a prediction set and a prediction mode, thereby realizing highaccuracy in prediction and preventing an increase in an encoding amount.

In order to achieve the above object, a first image decoding methodaccording to the present invention is an image decoding method fordecoding encoded data of an image and includes: the decoding step ofdecoding, from the encoded data, (i) a prediction set per predeterminedunit of the image according to prediction sets each including aplurality of prediction modes corresponding to different predictiondirections and different prediction methods, and (ii) a prediction modeand residual data each per sub block included in a predetermined unit;the predicting step of forming a predicted image per sub block by use ofa prediction set decoded for the predetermined unit and the predictionmode thus decoded per sub block; and the adding step of adding theresidual data thus decoded per sub block and the predicted image thusformed per sub block.

With the arrangement, it is possible to obtain the same effects as thefirst image decoding device according to the present invention.

It is preferable that a second image decoding device according to thepresent invention further include: decoding means for decodinginformation on a prediction direction and a prediction methodcorresponding to the prediction mode thus decoded in the prediction setthus decoded; and setting means for setting the prediction directionthus decoded and the prediction method thus decoded to the predictionmode in the prediction set.

In the above arrangement, the image decoding device forms prediction setdefinition information indicative of prediction methods to be assignedto respective prediction modes in a plurality of prediction sets to beapplied to a target frame to be decoded in encoded data of an image, onthe basis of relative prediction set definition information andprediction set information that has been already decoded. Then, theimage decoding device decodes a prediction set per block (M×M pixelblock) in the target frame to be decoded. Further, the image decodingdevice carries out intra prediction with respect to a target sub block(N×N pixel block) in a target block, by use of a locally decoded imageof a sub block adjacent to the target sub block and by referring to theprediction set definition information. The intra prediction is definedby prediction set information to be commonly applied to all sub blocksconstituting the target block and prediction mode information decodedfor the target sub block, and is carried out per sub block in the targetblock. Subsequently, the image decoding device generates a predictedimage of the target sub block. Finally, the image decoding devicecombines the predicted image thus generated and decoded predictionresidual data of the target sub block, so as to reconstruct an image ofthe target sub block.

As a result, in the case where the prediction set definition informationindicates a prediction set definition that focuses on predictions in ahorizontal direction, it is possible to generate predicted images frommore specific angles with the horizontal direction as a center. Further,in the case where the prediction set definition information indicates aprediction set that focuses on predictions in a vertical direction, itis possible to generate predicted images from more specific angles withthe vertical direction as a center.

As a result, the image decoding device can appropriately defineprediction modes in a plurality of prediction sets in accordance with animage, and can carry out prediction optimal for an edge orientation of atarget block to be encoded, from thus defined prediction modes. Thismakes it advantageously possible to more improve efficiency inprediction as compared to a case where a predetermined prediction set isused.

Further, a prediction method is expressed in a hierarchical manner witha prediction set and a prediction mode, thereby resulting in that theefficiency in prediction can be improved without increasing an encodingamount.

It is preferable that a second image decoding method according to thepresent invention further include the decoding step of decodinginformation on a prediction direction and a prediction methodcorresponding to the prediction mode thus decoded in the prediction setthus decoded; and the setting step of setting the prediction directionsthus decoded and the prediction methods thus decoded to the predictionmode in the prediction set.

With the arrangement, it is possible to obtain the same effects as thesecond image decoding device according to the present invention.

It is preferable that a fourth image encoding device according to thepresent invention further include: first determining means fordetermining a reference direction in which an encoded adjacent sub blockto be referred to at a time of estimating a prediction mode of a targetsub block to be encoded is positioned; first estimating means fordetermining an estimation value of a prediction mode for the target subblock based on a selected prediction set of the target sub block and aprediction mode of an encoded adjacent sub block that is specified bythe reference direction; generating means for generating relativeinformation of the prediction mode of the target sub block with respectto the estimation value thus determined; and encoding means for encodingthe relative information thus generated and the reference direction thusdetermined.

In the arrangement, the image encoding device selects a prediction setand a prediction mode from a prediction set group including a pluralityof prediction sets having different combinations of a plurality ofprediction modes corresponding to different prediction directions. Theimage encoding device then encodes an image by use of the prediction setthus selected and the prediction mode thus selected. This arrangementmakes it possible to carry out predictions from more various angles thanthe conventional technique. As a result, it is advantageously possibleto reduce an encoding amount of the image more, and to improve imagequality.

Further, the arrangement allows the image encoding device to select anencoded adjacent sub block to be used for estimation of a predictionmode, thereby improving efficiency in estimation of a prediction modeand to efficiently reduce an encoding amount necessary for theprediction mode.

It is preferable that a fourth image encoding method according to thepresent invention further include: the first determining step ofdetermining a reference direction in which an encoded adjacent sub blockto be referred to at a time of estimating a prediction mode of a targetsub block to be encoded is positioned the first estimating step ofdetermining an estimation value of a prediction mode for the target subblock based on a selected prediction set of the target sub block and aprediction mode of an encoded adjacent sub block that is specified bythe reference direction the generating step of generating relativeinformation of the prediction mode of the target sub block with respectto the estimation value thus determined; and the encoding step ofencoding the relative information thus generated and the referencedirection thus determined.

With the above arrangement, it is possible to obtain the same effects asthe fourth image encoding device according to the present invention.

It is preferable that a fourth image decoding device according to thepresent invention further include: decoding means for decoding relativeinformation on a prediction mode and a reference direction indicative ofa direction in which a decoded adjacent sub block to be referred to at atime of estimating a prediction mode of a target sub block to be decodedis positioned; first estimating means for determining an estimationvalue of a prediction mode for the target sub block based on a decodedprediction set of the target sub block and a prediction mode of andecoded adjacent sub block that is specified by the reference directionthus decoded; and decoding means for decoding a prediction mode to beapplied to the target sub block on the basis of the estimation valuethus determined and the decoded relative information on a predictionmode.

In the arrangement, the image decoding device includes a prediction setgroup including a plurality of prediction sets having differentcombinations of prediction modes corresponding to different predictiondirections. The image decoding device decodes prediction set informationindicative of which prediction set in the prediction set group is to beapplied to a target block to be decoded in constituent blocks of animage, according to relative prediction set information and predictionset information that has been already decoded. Then, the image decodingdevice carries out intra prediction per sub block into which the targetblock is subdivided. The intra prediction is defined by the predictionset information to be commonly applied to all sub blocks in the targetblock and prediction mode information decoded for a target sub block,and carried out by use of a locally decoded image of a sub blockadjacent to the target sub block, so as to generate a predicted image ofthe target sub block. Then, the image decoding device combines thepredicted image and decoded prediction residual data of the target subblock, so as to reconstruct an image of the target sub block.

For example, in the case where the prediction set information indicatesa prediction set that focuses on predictions in a horizontal direction,it is possible to generate predicted images from more specific angleswith the horizontal direction as a center. Further, in the case wherethe prediction set information indicates a prediction set that focuseson predictions in a vertical direction, it is possible to generatepredicted images from more specific angles with the vertical directionas a center.

This arrangement allows the image decoding device to carry out adecoding process with the use of predictions from more various anglesthan the conventional technique. As a result, it is possible toreproduce an edge portion more efficiently, thereby improving imagequality.

Further, with the arrangement, the image decoding device can select adecoded adjacent sub block to be used for estimation of a predictionmode, thereby improving efficiency in estimation of a prediction modeand efficiently reducing an encoded amount of the prediction mode, whichis to be decoded.

It is preferable that a fourth image decoding method according to thepresent invention further include: the decoding step of decodingrelative information on a prediction mode and a reference directionindicative of a direction in which a decoded adjacent sub block to bereferred to at a time of estimating a prediction mode of a target subblock to be decoded is positioned; the first estimating step ofdetermining an estimation value of a prediction mode for the target subblock based on a decoded prediction set of the target sub block and aprediction mode of an decoded adjacent sub block that is specified bythe reference direction thus decoded; and the decoding step of decodingthe prediction mode to be applied to the target sub block on the basisof the estimation value thus determined and the decoded relativeinformation on a prediction mode.

With the above arrangement, it is possible to obtain the same effects asthe fourth image decoding device according to the present invention.

It is preferable that a fifth image encoding device according to thepresent invention further include third selecting means for selectingone prediction set group to be applied to a target block to be encoded,from a plurality of different prediction set groups based on apredetermined evaluation standard.

In the arrangement, the image encoding device includes a plurality ofdifferent prediction set groups each including a plurality of predictionset having different combinations of a plurality of prediction modescorresponding to different prediction directions, and selects aprediction set group, a prediction set, and a prediction mode from theplurality of different prediction set groups. The image encoding devicethen encodes an image by use of the selected prediction set group, theselected prediction set, and the selected prediction mode. Thisarrangement allows the image encoding device to carry out predictionsfrom more various angles than the conventional technique, therebyadvantageously possible to reduce an encoding amount of the image and toimprove image quality.

It is preferable that a fifth image encoding method according to thepresent invention further include the third selecting step of selectingone prediction set group to be applied to a target block to be encoded,from a plurality of different prediction set groups based on apredetermined evaluation standard.

With the arrangement, it is possible to obtain the same effects as thefifth image encoding device according to the present invention.

It is preferable that a fifth image decoding device according to thepresent invention further include third selecting means for selectingone prediction set group to be applied to a target block to be decoded,from a plurality of different prediction set groups based on apredetermined evaluation standard.

In the arrangement, the image decoding device includes a plurality ofdifferent prediction set groups each including a plurality of predictionsets having different combinations of prediction modes corresponding torespective prediction directions different from each other. The imagedecoding device determines which prediction set group is to be appliedto a target block to be decoded in an image, from the plurality ofprediction set groups, based on a predetermined evaluation standard. Theimage decoding device determines a prediction set group per constituentblock of the image. The image decoding device then decodes predictionset information indicative of which prediction set in the determinedprediction set group is to be applied to the target block to be decoded,on the basis of relative prediction set information and prediction setinformation that has been already decoded. Subsequently, the imagedecoding device carries out intra prediction per sub block into whichthe target block is subdivided. The intra prediction is defined by theprediction set information to be commonly applied to all sub blocks inthe target block and prediction mode information decoded for a targetsub block, and is carried out by use of a locally decoded image of a subblock adjacent to the target sub block, so as to generate a predictedimage of the target sub block. The image decoding device then combinesthe predicted image and decoded prediction residual data of the targetsub block, so as to reconstruct an image of the target sub block.

This arrangement allows the image decoding device to carry out adecoding process with the use of predictions from more various angles,thereby making it possible to reproduce an edge portion moreefficiently. As a result, it is advantageously possible to improve imagequality.

It is preferable that a fifth image decoding method according to thepresent invention further include the third selecting step of selectingone prediction set group to be applied to a target block to be decoded,from a plurality of different prediction set groups based on apredetermined evaluation standard.

With the above arrangement, it is possible to obtain the same effects asthe fifth image decoding device according to the present invention.

In order to achieve the above object, a sixth image encoding deviceaccording to the present invention is an image encoding device forencoding an input image and includes: first selecting means forselecting one prediction mode per sub block included in a predeterminedunit of the input image, from one prediction set including a pluralityof different prediction modes corresponding to respective predictiondirections and respective prediction methods predicting means forforming a predicted image per sub block by use of the prediction set andthe prediction mode thus selected per sub block; and encoding means forencoding residual data between the input image and a predicted image,and the prediction mode thus selected per sub block, the encoding meansincluding: first determining means for determining, based on apredetermined evaluation standard, an encoded adjacent sub block to beused for estimation for the prediction mode thus selected per sub block;first estimating means for determining an estimation value of aprediction mode for a target sub block to be encoded, based on aprediction mode of the encoded adjacent sub block thus determined;generating means for generating relative information of the predictionmode thus selected per sub block, with respect to the estimation valuethus determined; and encoding means for encoding the relativeinformation thus generated.

The arrangement allows the image encoding device to estimate aprediction mode for a target sub block to be encoded, with the use of anencoded adjacent sub block that is most correlated with the target subblock. This improves efficiency in estimation of a prediction mode andefficiently reduces an encoding amount necessary for the predictionmode, thereby resulting in that efficiency in encoding is furtherimproved as compared to the conventional technique.

In order to achieve the above object, a sixth image encoding methodaccording to the present invention is an image encoding method forencoding an input image and includes: the first selecting step ofselecting one prediction mode per sub block included in a predeterminedunit from a plurality of different prediction modes included in oneprediction set, the plurality of different prediction modescorresponding to respective prediction direction and respectiveprediction methods; the predicting step of forming a predicted image persub block by use of the prediction set and the prediction mode thusselected per sub block; and the encoding step of encoding residual databetween the input image and the predicted image thus formed per subblock and the prediction mode thus selected per sub block, the encodingstep including: the first determining step of determining, based on apredetermined evaluation standard, an encoded adjacent sub block to beused for estimation for the prediction mode thus selected per sub block;the first estimating step of determining an estimation value of aprediction mode for a target sub block to be encoded, based on aprediction mode of the encoded adjacent sub block thus determined; thegenerating step of generating relative information of the predictionmode thus selected per sub block, with respect to the estimation valuethus determined; and the encoding step of encoding the relativeinformation thus generated.

With the arrangement, it is possible to obtain the same effects as thesixth image encoding device according to the present invention.

In order to achieve the above object, a sixth image decoding deviceaccording to the present invention is an image decoding device fordecoding encoded data of an image and includes: decoding means fordecoding, from the encoded data, a prediction mode and residual dataeach per sub block included in a predetermined unit of the image,according to one prediction set including a plurality of predictionmodes corresponding to different prediction directions and differentprediction methods predicting means for forming a predicted image persub block by use of the prediction mode thus decoded per sub block; andadding means for adding the residual data thus decoded per sub block andthe predicted image thus formed per sub block, the decoding meansincluding: decoding means for decoding relative information on aprediction mode; first determining means for determining a decodedadjacent sub block to be used for estimation of the prediction mode,based on a predetermined evaluation standard; first estimating means fordetermining an estimation value of a prediction mode for a target subblock to be decoded, based on a prediction mode of the decoded adjacentsub block thus determined; and decoding means for decoding theprediction mode of the target sub block on the basis of the estimationvalue thus determined and the decoded relative information on aprediction mode.

The arrangement allows the image decoding device to estimate aprediction mode for a target sub block to be decoded, with the use of adecoded adjacent sub block that is most correlated with the target subblock, thereby improving efficiency in estimation of a prediction modeand efficiently reducing an encoded amount of the prediction mode, whichis to be decoded. As a result, it is possible to further improveefficiency in decoding as compared to the conventional technique.

In order to achieve the above object, a sixth image decoding methodaccording to the present invention is an image decoding method fordecoding encoded data of an image and includes: the decoding step ofdecoding, from the encoded data, a prediction mode and residual dataeach per sub block included in a predetermined unit of the image,according to one prediction set including a plurality of predictionmodes corresponding to different prediction directions and differentprediction methods; the predicting step of forming a predicted image persub block by use of the prediction mode thus decoded per sub block; andthe adding step of adding the residual data thus decoded per sub blockand the predicted image thus formed per sub block, the decoding stepincluding: the adding step of adding the residual data thus decoded persub block and the predicted image thus formed per sub block; the firstdetermining step of determining a decoded adjacent sub block to be usedfor estimation of the prediction mode, based on a predeterminedevaluation standard; the first estimating step of determining anestimation value of a prediction mode for a target sub block to bedecoded, based on a prediction mode of the decoded adjacent sub blockthus determined; and the decoding step of decoding the prediction modeof the target sub block on the basis of the estimation value thusdetermined and the decoded relative information on a prediction mode.

With the above arrangement, it is possible to obtain the same effects asthe sixth image decoding device according to the present invention.

The image encoding device and the image decoding device may be realizedby a computer. In this case, a program that realizes the image encodingdevice or the image decoding device in a computer by causing thecomputer to function as each means described above, and acomputer-readable storage medium in which the program is stored are alsoincluded in the scope of the present invention.

Additional objects, features, and strengths of the present inventionwill be made clear by the description below. Further, the advantages ofthe present invention will be evident from the following explanation inreference to the drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1

FIG. 1 is a block diagram showing essential part of an arrangement of animage encoding device according to Embodiment 1.

FIG. 2

FIG. 2 is flowchart schematically showing an image encoding processaccording to Embodiment 1.

FIG. 3

FIG. 3 is a flowchart specifically showing a determination process ofedge information, according to Embodiment 1.

FIG. 4

FIG. 4 illustrates concrete examples of edges detected by an edgeanalysis section. (a) of FIG. 4 is an original image in which horizontalstripes are formed, and (b) of FIG. 4 is an edge image detectedtherefrom; (c) of FIG. 4 is an original image in which vertical stripesare formed, and (d) of FIG. 4 is an edge image detected therefrom; and(e) of FIG. 4 is an original image in which a twist pattern is formed,and (f) of FIG. 4 is an edge image detected therefrom.

FIG. 5

FIG. 5 illustrates edge orientation distributions of edge imagesdetected by an edge analysis section. (a) of FIG. 5 shows a case whereedges are oriented mostly in a horizontal direction. (b) of FIG. 5 showsa case where edges are oriented mostly in a vertical direction. (c) ofFIG. 5 shows a case where edges are oriented mainly in a horizontaldirection and in a vertical direction.

FIG. 6

FIG. 6 shows prediction modes except for a DC prediction in predictionsets in Embodiment 1. (a) through (d) in FIG. 6 correspond to predictionsets 0 through 3, respectively.

FIG. 7

FIG. 7 is a flowchart specifically showing a process of determiningprediction set information.

FIG. 8

FIG. 8 is a block diagram showing an arrangement of a relativeprediction set information forming section in an image encoding deviceaccording to Embodiment 1.

FIG. 9

FIG. 9 illustrates one example of positions of encoded blocks to be usedfor prediction in a prediction set information predicting section.

FIG. 10

FIG. 10 is a flowchart showing a process of encoding prediction setinformation, in a relative prediction set information forming section.

FIG. 11

FIG. 11 illustrates how to generate a predicted image from a predictiondirection θ.

FIG. 12

FIG. 12 illustrates examples of a reference pixel region to be used forgenerating a predicted image from a prediction direction θ. (a) of FIG.12 illustrates a case where K=2 and L=2L, (b) of FIG. 12 illustrates acase where K=N and L=2N, (c) of FIG. 12 illustrates a case where K=2Nand L=N, (d) of FIG. 12 illustrates a case where K=N and L=N, (e) ofFIG. 12 illustrates a case where K=0 and L=2N, and (f) of FIG. 12illustrates a case where K=N and L=0.

FIG. 13

FIG. 13 schematically illustrates relations between encoding unitsaccording to the present invention. (a) of FIG. 13 illustrates a GOP,(b) of FIG. 13 illustrates a picture (frame), (c) of FIG. 13 illustratesa slice, (d) of FIG. 13 illustrates a macro block, and (e) of FIG. 13illustrates a block.

FIG. 14

FIG. 14 is a block diagram showing essential part of an arrangement ofan image decoding device according to Embodiment 2.

FIG. 15

FIG. 15 is a flowchart schematically showing an image decoding processaccording to Embodiment 2.

FIG. 16

FIG. 16 is a block diagram showing an arrangement of a prediction setinformation forming section in an image decoding device according toEmbodiment 2.

FIG. 17

FIG. 17 is a flowchart showing a process of forming prediction setinformation, in a prediction set information forming section.

FIG. 18

FIG. 18 is a block diagram showing essential part of an arrangement ofan image encoding device according to Embodiment 3.

FIG. 19

FIG. 19 is a flowchart schematically showing an image encoding processaccording to Embodiment 3.

FIG. 20

FIG. 20 is a flowchart specifically showing a process of determiningprediction set information.

FIG. 21

FIG. 21 shows an edge orientation histogram of a case where edges areoriented mostly in a horizontal direction.

FIG. 22

FIG. 22 shows an edge orientation cumulative frequency distributionobtained from an edge orientation histogram in which edges are orientedmainly in a horizontal direction.

FIG. 23

FIG. 23 illustrates a positional relation between a prediction directionθn and a prediction direction θn+1.

FIG. 24

FIG. 24 is a block diagram showing an arrangement of a relativeprediction set definition information forming section in an imageencoding device according to Embodiment 3.

FIG. 25

FIG. 25 is a flowchart showing a process of encoding prediction setdefinition information, in a relative prediction set definitioninformation forming section.

FIG. 26

FIG. 26 is a block diagram showing essential part of an arrangement ofan image decoding device according to Embodiment 4.

FIG. 17

FIG. 27 is a flowchart schematically showing an image decoding processaccording to Embodiment 4.

FIG. 28

FIG. 28 is a block diagram showing an arrangement of a prediction setdefinition information forming section in an image decoding deviceaccording to Embodiment 4.

FIG. 29

FIG. 29 is a flowchart showing a process of forming prediction setinformation, in a prediction set definition information forming section.

FIG. 30

FIG. 30 is a block diagram showing essential part of an arrangement ofan image encoding device according to Embodiment 5.

FIG. 31

FIG. 31 is a block diagram showing an arrangement of a relativeprediction mode information forming section.

FIG. 32

FIG. 32 is a flowchart schematically showing an image encoding processaccording to Embodiment 5.

FIG. 33

FIG. 33 illustrates explanatory views of sub-block groups. (a) of FIG.33 illustrates sub-block groups when sizes M and N, respectively of atarget block and a sub block, are such that N=M/4, and (b) of FIG. 33illustrates a sub-block group when sizes M and N, respectively of atarget block and a sub block, are such that N=M/2.

FIG. 34

FIG. 34 illustrates reference sub block directions according to areference direction combination table.

FIG. 35

FIG. 35 illustrates a positional relation between a target sub block tobe encoded and a reference sub block. (a) of FIG. 35 illustrates apositional relation between a target sub block P to be encoded and areference sub block Q in a case of a reference direction “0”. (b) ofFIG. 35 illustrates a positional relation between a target sub block Pto be encoded and a reference sub block Q in a case of a referencedirection “1”.

FIG. 36

FIG. 36 is a flowchart specifically showing a process of generatingrelative prediction mode information.

FIG. 37

FIG. 37 is a flowchart showing a process of determining encodeparameters (s, p, M).

FIG. 38

FIG. 38 is a block diagram showing essential part of an arrangement ofan image decoding device according to Embodiment 6.

FIG. 39

FIG. 39 is a block diagram showing an arrangement of a prediction modeinformation forming section.

FIG. 40

FIG. 40 is a flowchart schematically showing an image decoding processaccording to Embodiment 6.

FIG. 41

FIG. 41 is a flowchart specifically showing a process of generatingprediction mode information.

FIG. 42

FIG. 42 is a block diagram showing essential part of an arrangement ofan image encoding device according to Embodiment 7.

FIG. 43

FIG. 43 is a block diagram showing an arrangement of a relativeprediction mode information forming section.

FIG. 44

FIG. 44 illustrates a target sub block and encoded sub blocks positionedaround the target sub block.

FIG. 45

FIG. 45 is a flowchart schematically showing an image

encoding process according to Embodiment 7.

FIG. 46

FIG. 46 illustrates a relative position of Q with respect to a targetsub block P where the target sub block P is regarded as a basic point(0, 0), a horizontal direction is regarded as an X axis, and a verticaldirection is regarded as a Y axis.

FIG. 47

FIG. 47 is a flowchart specifically showing a process of generatingrelative prediction mode information.

FIG. 48

FIG. 48 is a block diagram showing essential part of an arrangement of amodified example of an image encoding device according to Embodiment 7.

FIG. 49

FIG. 49 is a block diagram showing an arrangement of a relativeprediction mode information forming section in the modified example.

FIG. 50

FIG. 50 is a block diagram showing essential part of an arrangement ofan image decoding device according to Embodiment 8.

FIG. 51

FIG. 51 is a block diagram showing an arrangement of a prediction modeinformation forming section.

FIG. 52

FIG. 52 is a flowchart schematically showing an image decoding processaccording to Embodiment 8.

FIG. 53

FIG. 53 is a flowchart specifically showing a process of generatingprediction mode information.

FIG. 54

FIG. 54 is a block diagram illustrating essential part of an arrangementof a modified example of an image decoding device according toEmbodiment 8.

FIG. 55

FIG. 55 is a block diagram showing an arrangement of a prediction modeinformation forming section in the modified example.

FIG. 56

FIG. 56 is a block diagram showing essential part of an arrangement ofan image encoding device according to Embodiment 9.

FIG. 57

FIG. 57 is a block diagram showing an arrangement of a relativeprediction set information forming section.

FIG. 58

FIG. 58 is a flowchart schematically showing an image encoding processaccording to Embodiment 9.

FIG. 59

FIG. 59 is a flowchart showing an operation process at a time ofselecting a prediction set group.

FIG. 60

FIG. 60 is a flowchart showing an operation process of a relativeprediction set information forming section.

FIG. 61

FIG. 61 is a block diagram showing essential part of an arrangement ofan image decoding device according to Embodiment 10.

FIG. 62

FIG. 62 is a block diagram showing an arrangement of a prediction setinformation forming section.

FIG. 63

FIG. 63 is a flowchart schematically showing an image decoding processaccording to Embodiment 10.

FIG. 64

FIG. 64 is a flowchart showing an operation process of a prediction setinformation forming section.

FIG. 65

FIG. 65 is a block diagram showing essential part of an arrangement of aconventional image encoding device.

FIG. 66

FIG. 66 illustrates an example of prediction modes to be used for intraprediction carried out with respect to a target block to be encoded.

FIG. 67

FIG. 67 illustrates concrete examples of intra prediction in aconventional image encoding device. (a) of FIG. 67 illustrates aconcrete example in which prediction residual data is obtained from animage having vertical stripes. (b) of FIG. 67 illustrates a concreteexample in which prediction residual data is obtained

from an image having diagonal stripes. FIG. 68

FIG. 68 illustrates prediction modes in intra prediction for a 4×4 pixelblock and a 8×8 pixel block.

FIG. 69

FIG. 69 illustrates a positional relation between a target block and itsadjacent blocks.

FIG. 70

FIG. 70 illustrates a positional relation between a target block andencoded regions.

FIG. 71

FIG. 71 is a block diagram showing essential part of an arrangement of aconventional image decoding device.

FIG. 72

FIG. 72 illustrates other concrete examples of intra prediction in aconventional image encoding device. (a) of FIG. 72 illustrates aconcrete example in which prediction residual data is obtained from animage having vertical stripes. (b) of FIG. 72 illustrates a concreteexample in which prediction residual data is obtained from an imagehaving diagonal stripes.

FIG. 73

FIG. 73 illustrates a case where prediction encoding is carried out withrespect to a prediction mode of a target block D1 on the basis of aprediction mode of an adjacent left block D2 and a prediction mode of anadjacent upper block D3.

REFERENCE SIGNS LIST

-   1 Difference Computing Section-   2 Orthogonal Transformation Section-   3 Quantization Section-   4 Entropy Encoding Section (Encoding Means)-   5 Entropy Decoding Section (Decoding Means)-   6 Inverse Quantization Section-   7 Inverse Orthogonal Transformation Section-   8 Addition Computing Section-   9 Memory-   10 Intra Prediction Section (Encoding Means, Decoding Means)-   11 Prediction Mode Determining Section (Second Selecting Means)-   12 Edge Analysis Section (Calculating Means)-   13 Prediction Set Determining Section (First Selecting Means)-   14 Encode Parameter Determining Section (Selecting Means)-   15 Prediction Set Group Selecting Section (Selecting Means)-   51 Relative Prediction Set Information Forming Section (Encoding    Means)-   52 Prediction Set Information Forming Section (Decoding Means)-   53 Relative Prediction Set Definition Information Forming Section    (Encoding Means)-   54 Prediction Set Definition Information Forming Section (Decoding    Means)-   61 Relative Prediction Mode Information Forming Section (Encoding    Means)-   62 Prediction Mode Information Forming Section (Decoding Means)-   100 Image Encoding Device-   150 Image Decoding Device-   200 Image Encoding Device-   204 Entropy Encoding Section (Encoding Means)-   205 Entropy Decoding Section (Decoding Means)-   210 Intra Prediction Section (Encoding Means, Decoding Means)-   211 Prediction Mode Determining Section (Second Selecting Means)-   212 Edge Analysis Section (Calculating Means)-   213 Prediction Set Determining Section (First Selecting Means)-   214 Prediction Set Definition Determining Section-   250 Image Decoding Device-   300 Image Encoding Device-   304 Entropy Encoding Section (Encoding Means)-   305 Entropy Decoding Section-   310 Intra Prediction Section-   311 Prediction Mode Determining Section-   350 Image Decoding Device-   500 Image Encoding Device-   504 Entropy Encoding Section-   505 Entropy Decoding Section-   511 Relative Prediction Set Information Generation Section-   512 Prediction Set Information Predicting Section-   513 Prediction Set Information Storing Section-   521 Prediction Set Information Generation Section-   531 Relative Prediction Set Definition Information-   Generation Section-   532 Prediction Set Definition Information Predicting Section-   533 Prediction Set Definition Information Storing Section-   541 Prediction Set Definition Information Generation Section-   550 Image Decoding Device-   600 Image Encoding Device-   600 b Image Encoding Device-   650 Image Decoding Device-   650 b Image Decoding Device-   661 Relative Prediction Mode Information Forming Section-   661 b Relative Prediction Mode Information Forming Section-   662 Storing Section-   663 Reference Position Determining Section-   663 b Reference Position Determining Section-   664 Prediction Mode Information Estimating Section-   665 Relative Prediction Mode Information Generation Section-   666 Prediction Mode Information Forming Section-   666 b Prediction Mode Information Forming Section-   667 Storing Section-   668 Reference Position Determining Section-   668 b Reference Position Determining Section-   669 Prediction Mode Information Estimating Section-   670 Prediction Mode Information Generation Section-   700 Image Encoding Device-   710 Intra Prediction Section (Encoding Means, Decoding Means)-   714 Encode Parameter Determining Section (Selecting Means)-   750 Image Decoding Device-   751 Relative Prediction Set Information Forming Section (Encoding    Means)-   752 Storing Means-   753 Prediction Set Information Predicting Section-   754 Relative Prediction Set Information Generation Section-   755 Prediction Set Information Forming Section (Decoding Section)-   756 Storing Section-   757 Prediction Set Information Predicting Section-   758 Prediction Set Information Generation Section

DESCRIPTION OF EMBODIMENTS

[Embodiment 1]

An image encoding device according to the present invention will bedescribed below as Embodiment 1 with reference to FIG. 1 through FIG.13.

(Arrangement of Image Encoding Device 100)

Initially, an arrangement of an image encoding device 100 according tothe present embodiment will be described below with reference to FIG. 1.FIG. 1 is a block diagram showing the arrangement of the image encodingdevice 100 according to the present embodiment. The image encodingdevice 100 includes a difference computing section 1, an orthogonaltransformation section 2, a quantization section 3, an entropy encodingsection 4, an inverse quantization section 6, an inverse orthogonaltransformation section 7, an addition computing section 8, a memory 9,an intra prediction section 10, a prediction mode determining section11, an edge analysis section 12, a prediction set determining section13, and a relative prediction set information forming section 51 (FIG.1). The present embodiment describes below the entropy encoding section4, the intra prediction section 10, the prediction mode determiningsection 11, the edge analysis section 12, the prediction set determiningsection 13, and the relative prediction set information forming section51, which are constituent components that have not been described in theexplanation about the conventional technique.

(Entropy Encoding Section 4)

The entropy encoding section 4 carries out entropy encoding with respectto prediction residual data, prediction mode information, relativeprediction set information, and the like, and outputs encoded data.

(Intra Prediction Section 10)

The intra prediction section 10 carries out intra prediction indicatedby prediction set information and prediction mode information, by use ofa locally decoded image stored in the memory 9, and generates apredicted image. How to generate prediction pixels will be morespecifically described later.

(Prediction Mode Determining Section 11)

The prediction mode determining section 11 receives an original image ofa target block to be encoded and a locally decoded image that issupplied from the memory 9, and determines one prediction mode to beused for predicting the target block to be encoded, from a plurality ofprediction modes indicated by prediction set information received fromthe prediction set determining section 13, based on the original imageof the target block and the locally decoded image. The prediction modedetermining section 11 then supplies prediction mode informationindicative of the determined prediction mode to the intra predictionsection 10 and the entropy encoding section 4. The prediction residualcost minimization method or the rate distortion optimization method canbe used for determination of a prediction mode.

(Edge Analysis Section 12)

The edge analysis section 12 calculates an edge strength and an edgeorientation from detected edges. More specifically, the edge analysissection 12 detects edges in each sub block (N×N pixel block), into whichthe target block (M×M pixel block) to be encoded is subdivided. Then,the edge analysis section 12 calculates the edge strength and the edgeorientation from the edges thus detected.

(Prediction Set Determining Section 13)

The prediction set determining section 13 determines a prediction set tobe applied to the target block to be encoded. More specifically, theprediction set determining section 13 determines a prediction set to beapplied to the target block, from a predetermined prediction set group,based on the edge orientation and the edge strength of the target block,which are calculated by the edge analysis section 12. The prediction setdetermining section 13 then outputs prediction set informationindicative of the determined prediction set. The prediction set (group)will be described later more specifically.

(Relative Prediction Set Information Forming Section 51)

The relative prediction set information forming section 51 predicts,based on encoded information indicative of a prediction set, theprediction set information indicative of the prediction set to beapplied to the target block to be encoded, which prediction setinformation is determined by the prediction set determining section 13,and outputs information (relative prediction set information) thatindicates the prediction set by a flag and a difference based on theprediction. The relative prediction set information forming section 51will be more specifically described later.

(Overview of Image Encoding Process)

With reference to FIG. 2, an image encoding process in the imageencoding device 100 is generally described below. FIG. 2 is a flowchartschematically showing the image encoding process in the image encodingdevice 100.

(Reception of Target Block to be Encoded and Calculation of EdgeInformation)

When the image encoding device 100 receives a target block (M×M pixelblock) to be encoded (Step S1), the edge analysis section 12 subdividesthe target block (M×M pixel block) into sub blocks (N×N pixel blocks,N≦M) (Step S2). Subsequently, the edge analysis section 12 calculates,as edge information, an edge strength and an edge orientation of each ofthe sub blocks constituting the M×M pixel block (Step S3). How tocalculate the edge information will be descried later more specifically.

(Determination of Prediction Set and Encoding of Prediction SetInformation)

The prediction set determining section 13 determines a prediction set tobe applied to the target block to be encoded, based on the edgeinformation calculated in Step S3, and supplies information (hereinafteralso referred to as prediction set information) indicative of thusdetermined prediction set to the prediction mode determining section 11,the relative prediction set information forming section 51, and theintra prediction section 10 (Step S4). The relative prediction setinformation forming section 51 receives the prediction set informationfrom the prediction set determining section 13, predicts prediction setinformation based on encoded information on a prediction set, andsupplies relative prediction set information to the entropy encodingsection 4 (Step S5). The entropy encoding section 4 carries out entropyencoding with respect to the relative prediction set information andoutputs thus encoded relative prediction set information (Step S6). Howto determine a prediction set, how to encode prediction set information,and a data structure of the prediction set information will be describedlater, more specifically.

(Determination of Prediction Mode and Encoding of Prediction ModeInformation)

The prediction mode determining section 11 determines a prediction modeto be used for predicting a target sub block to be encoded, from aplurality of prediction modes indicated by the prediction setinformation received from the prediction set determining section 13, onthe basis of a locally decoded image of an adjacent sub block that hasbeen already encoded, which locally decoded image is supplied from thememory 9. The prediction mode determining section 11 then supplies thusdetermined prediction mode information to the intra prediction section10 and the entropy encoding section 4 (Step S7). The entropy encodingsection 4 carries out entropy encoding with respect to the receivedprediction mode information, and outputs encoded data of the predictionmode information (Step S8). Here, the sub block to be encoded indicatesa sub block that is obtained by subdividing the target block to beencoded into N×N pixel blocks.

(Generation of Predicted Image)

The intra prediction section 10 carries out intra prediction defined bythe prediction set determined in Step S4 and the prediction modedetermined in Step S7, by use of a locally decoded image of adjacent subblocks that have been already encoded, which locally decoded image issupplied from the memory 9, so as to generate a predicted image of thetarget sub block to be encoded. The intra prediction section 10 thensupplies the predicted image to the difference computing section 1 andthe addition computing section 8 (Step S9).

(Calculation of Prediction Residual Data)

The difference computing section 1 calculates prediction residual data(N×N pixel block), which is the difference between the inputted originalimage of the target sub block to be encoded and the predicted imagegenerated in Step S9, and outputs the prediction residual data (StepS10).

(Orthogonal Transformation and Quantization)

The prediction residual data thus calculated in Step S10 is supplied tothe orthogonal transformation section 2 and then to the quantizationsection 3, so as to be subjected to orthogonal transformation andquantization, respectively, and then supplied to the entropy encodingsection 4 and the inverse quantization section 6 (Step S11).

(Inverse Orthogonal Transformation and Inverse Quantization)

The prediction residual data that has been subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization 6 and then to the inverse orthogonal transformation section7, so as to be subjected to inverse quantization and inverse orthogonaltransformation, respectively, and then supplied to the additioncomputing section 8 (Step S12).

(Generation of Locally Decoded Image)

The addition computing section 8 adds the prediction residual data thussubjected to the inverse quantization and the inverse orthogonaltransformation in Step S12, to the predicted image generated in Step S9,so as to generate a locally decoded image (N×N pixel block) (Step S13).Thus generated locally decoded image is stored in the memory 9.

(Encoding of Prediction Residual Data)

The entropy encoding section 4 carries out entropy encoding with respectto thus quantized prediction residual data of the target sub block, andoutputs encoded data of the prediction residual data (Step S14).

The processes in Steps S7 through S14 are carried out with respect toall sub blocks constituting the target block to be encoded. Further, theprocesses in Steps S1 through S14 are carried out with respect to allblocks constituting a target image to be encoded.

(Additional Matters)

The present embodiment describes the encoding process in the imageencoding device 100 in the order from Step S1 to Step S14. However, theorder of the encoding process is not limited to this, and can be alteredwithin a range in which the present invention can be carried out.

(Details of how Edge Analysis Section 12 Operates and Data Structure ofEdge Information)

Table 1 shows a data structure of the edge information calculated in theedge analysis section 12. In Table 1, “bk” indicates a counterindicative of a position of a sub block in the target block to beencoded, and “end_bk” indicates the number of the last sub blockpositioned at the end of the target block to be encoded.

TABLE 1 Parameter Detail edge_data( ){ Edge Information  for(bk=0;bk<=end_bk; bk++){  edge_orientation[bk] Indicative of Edge Orientationat Position bk in Sub Blocks  ege_strength[bk] Indicative of EdgeStrength at Position bk in Sub Blocks  } }

How the edge analysis section 12 operates is specifically describedbelow with reference to FIG. 3. FIG. 3 is a flowchart specificallyshowing a determination process of the edge information.

In response to receiving a target block (M×M pixel block, M≧N) to beencoded, the edge analysis section 12 subdivides the received targetblock to be encoded into N×N pixel blocks (Step S20), and initializes acounter bk indicative of a position of a sub block in the target blockto be encoded to 0 (Step S21).

Subsequently, the edge analysis section 12 calculates, by an operator,gradient vectors (a horizontal component, a vertical component) for allpixels in a sub block (hereinafter also referred to as a target subblock) indicated by the counter bk (Step S22). The operator thatcalculates the gradient vector may be, for example, a Sobel operator, aPrewitt operator, or the like. Further, the gradient vector may becalculated by a difference between values of pixels positioned on theleft and right of a target pixel and a difference between values ofpixels positioned on the top and bottom of the target pixel, asrepresented by the following equation (7).

$\begin{matrix}{{Math}.\mspace{14mu} 4} & \; \\{{G\left( {x,y} \right)} = {\begin{bmatrix}{G_{x}\left( {x,y} \right)} \\{G_{y}\left( {x,y} \right)}\end{bmatrix} = \begin{bmatrix}{{I\left( {{x + 1},y} \right)} - {I\left( {{x - 1},y} \right)}} \\{{I\left( {x,{y + 1}} \right)} - {I\left( {x,{y - 1}} \right)}}\end{bmatrix}}} & (7)\end{matrix}$

In the equation, I(x, y) indicates a pixel value at a pixel position (x,y) in the target sub block, and G(x, y) indicates a gradient vector atthe pixel position (x, y).

The edge analysis section 12 calculates edge information from thegradient vectors of all the pixels in the target sub block calculated inStep S22 (Step S23). In the specification, the “edge information”indicates edge_orientation[bk], which is an edge orientation of thetarget sub block, and edge_strength[bk], which is an edge strength ofthe target sub block. How to calculate the edge orientation and the edgestrength will be described later.

The edge analysis section 12 stores, in edge information edge_data( ),the edge orientation and the edge strength of the target sub block,which are calculated in Step S23 (Step S24), and increments the counterbk by 1 (Step S25).

Subsequently, the edge analysis section 12 determines whether or not avalue of the counter bk is larger than a value of end_bk (Step S26). Ifthe value indicated by the counter bk is not larger than the end_bk,which is of the last sub block in the target block to be encoded (Yes inStep S26), the edge analysis section 12 calculates gradient vectors ofall pixels in a subsequent sub block. That is, the process returns toStep S22. If the value indicated by the counter bk is larger than theend_bk, which is of the last sub block in the target block to be encoded(No in Step S26), the edge analysis section 12 outputs the edgeinformation edge_data( ), and completes the edge analysis operation withrespect to the target block to be encoded (Step S27).

(Details of how to Calculate Edge Orientation and Edge Strength)

The following explains about a concrete example of how to calculate theedge orientation and the edge strength.

The edge strength indicates an average strength of the gradient vectorseach per pixel in the target sub block, and can be calculated by thefollowing equation (8) or (9). Here, Gx and Gy respectively indicates anx component and a y component in a gradient vector G(x, y).

$\begin{matrix}{P = {\frac{1}{N^{2}}{\sum\limits_{x,{y \in {block}}}^{\;}\;\left\{ {{G_{x}^{2}\left( {x,y} \right)} + {G_{y}^{2}\left( {x,y} \right)}} \right\}}}} & (8) \\{P = {\frac{1}{N^{2}}{\sum\limits_{x,{y \in {block}}}^{\;}\sqrt{{G_{x}^{2}\left( {x,y} \right)} + {G_{y}^{2}\left( {x,y} \right)}}}}} & (9)\end{matrix}$

The edge orientation can be calculated by various methods and is notlimited in any particular manner. The present embodiment describes howto calculate the edge orientation, by taking, as an example, a methoddisclosed in Non Patent Literature 2. Non Patent Literature 2 alsodiscloses a technique for introducing the edge orientation forfingerprint detection.

Initially, a gradient vector at a pixel position in the target sub blockis calculated by the following equation (10). In the equation (10),“sign( )” is a function represented by the following equation (11) inwhich if x is not less than 0, the function returns “1”, and if x isnegative, the function returns “−1”. Then, a square gradient vectorGs(x, y) is calculated by use of the calculated gradient vector G(x, y)at the pixel position (x, y) in the target sub block, in accordance withthe following equation (12). Furthermore, an average square vector inthe target sub block is calculated by use of square gradient vectors ofall the pixels in the target sub block, in accordance with the followingequation (13).

$\begin{matrix}{{Math}.\mspace{14mu} 6} & \; \\{{G\left( {x,y} \right)} = {\begin{bmatrix}{G_{x}\left( {x,y} \right)} \\{G_{y}\left( {x,y} \right)}\end{bmatrix} = {{{sign}\left( \frac{\partial{I\left( {x,y} \right)}}{\partial x} \right)}\begin{bmatrix}\frac{\partial{I\left( {x,y} \right)}}{\partial x} \\\frac{\partial{I\left( {x,y} \right)}}{\partial y}\end{bmatrix}}}} & (10) \\{{{sign}(x)} = \left\{ \begin{matrix}1 & {for} & {x \geq 0} \\{- 1} & \; & {x < 0}\end{matrix} \right.} & (11) \\{{G_{s}\left( {x,y} \right)} = {\begin{bmatrix}{G_{s,x}\left( {x,y} \right)} \\{G_{s,y}\left( {x,y} \right)}\end{bmatrix} = \begin{bmatrix}{{G_{x}\left( {x,y} \right)}^{2} - {G_{y}\left( {x,y} \right)}^{2}} \\{2\;{G_{x}\left( {x,y} \right)}{G_{y}\left( {x,y} \right)}}\end{bmatrix}}} & (12) \\{{\overset{\Cup}{G}}_{s} = \begin{bmatrix}{\sum\limits_{y = 0}^{N - 1}\;{\sum\limits_{x = 0}^{N - 1}\;{{G_{s,x}\left( {x,y} \right)}/N^{2}}}} \\{\sum\limits_{y = 0}^{N - 1}\;{\sum\limits_{x = 0}^{N - 1}\;{{G_{s,y}\left( {x,y} \right)}/N^{2}}}}\end{bmatrix}} & (13)\end{matrix}$

Subsequently, Gxx, Gyy, and Gxy are defined as the following equation(14). A direction φ of a gradient vector of the target sub block iscalculated by use of thus defined Gxx, Gyy, and Gxy, in accordance withthe following equation (15). Here, ∠(x, y) is defined by the followingequation (16). Further, [rad] in the equation (16) is an angle unit inthe circular measure.

$\begin{matrix}{{Math}.\mspace{14mu} 7} & \; \\{{G_{xx} = {\sum\limits_{y = 0}^{N - 1}\;{\sum\limits_{x = 0}^{N - 1}\;{{G_{s,x}\left( {x,y} \right)}^{2}/N^{2}}}}}{G_{yy} = {\sum\limits_{y = 0}^{N - 1}\;{\sum\limits_{x = 0}^{N - 1}\;{{G_{s,y}\left( {x,y} \right)}^{2}/N^{2}}}}}{G_{xy} = {\sum\limits_{y = 0}^{N - 1}\;{\sum\limits_{x = 0}^{N - 1}\;{{G_{s,x}\left( {x,y} \right)}{{G_{s,y}\left( {x,y} \right)}/N^{2}}}}}}} & (14) \\{\phi = {\frac{1}{2}{{\angle\left( {{G_{xx}^{2} - G_{yy}^{2}},{2\; G_{xy}}} \right)}\lbrack{rad}\rbrack}}} & (15) \\{{\angle\left( {u,v} \right)} = \left\{ \begin{matrix}{{\tan^{- 1}\left( {v/u} \right)}\lbrack{rad}\rbrack} & \; & {u \geq 0} \\{{\tan^{- 1}\left( {v/u} \right)} + {\pi\lbrack{rad}\rbrack}} & {for} & {u < {0\bigwedge v} \geq 0} \\{{\tan^{- 1}\left( {v/u} \right)} - {\pi\lbrack{rad}\rbrack}} & \; & {u < {0\bigwedge v} < 0}\end{matrix} \right.} & (16)\end{matrix}$

The edge orientation θ of the target sub block is perpendicular to adirection of the gradient of the target sub block, and therefore can becalculated by the following equation (17). If the edge orientation θ ofthe target sub block is expressed by the circular measure, it ispossible to convert the edge orientation θ in accordance with thefollowing equation (18). Here, [deg] in the equation (18) is an angleunit in the degree measure.

The aforementioned methods for calculating the edge orientation and theedge strength are applied to an edge analysis section 212 of an imageencoding device 200 according to Embodiment 3, which will be describedlater.

$\begin{matrix}{{Math}.\mspace{14mu} 8} & \; \\{\theta = \left\{ \begin{matrix}{\phi + {\frac{\pi}{2}\lbrack{rad}\rbrack}} & {for} & {\phi \leq 0} \\{\phi - {\frac{\pi}{2}\lbrack{rad}\rbrack}} & \; & {\phi > 0}\end{matrix} \right.} & (17) \\{\theta = {\frac{180}{\pi} \times {\theta\left\lbrack \deg \right\rbrack}}} & (18)\end{matrix}$

(Concrete Example of Edge Detection)

The following describes concrete examples of edges detected by the edgeanalysis section 12, with reference to (a) through (f) of FIG. 4. (a)through (f) of FIG. 4 illustrate concrete examples of edges detected bythe edge analysis section 12. (a) of FIG. 4 is an original image inwhich horizontal stripes are formed, and (b) of FIG. 4 is an edge imagedetected therefrom; (c) of FIG. 4 is an original image in which verticalstripes are formed, and (d) of FIG. 4 is an edge image detectedtherefrom; and (e) of FIG. 4 is an original image in which a twistpattern is formed, and (f) of FIG. 4 is an edge image detectedtherefrom. In these edge images, a black part indicates a flat portionand a white part indicates an edge portion.

In the case of the horizontal stripes illustrated in (a) of FIG. 4, manyedges in a horizontal direction are detected as illustrated in (b) ofFIG. 4. In this case, an edge orientation distribution is like oneillustrated in (a) of FIG. 5. In the case of the vertical stripesillustrated in (c) of FIG. 4, many edges in a vertical direction aredetected as illustrated in (d) of FIG. 4. In this case, an edgeorientation distribution is like one illustrated in (b) of FIG. 5. Inthe case of the twist pattern illustrated in (e) of FIG. 4, many edgesin the horizontal direction and in the vertical direction are detectedas illustrated in (f) of FIG. 4. In this case, an edge orientationdistribution is like one illustrated in (c) of FIG. 5.

(a) through (c) of FIG. 5 respectively show edge orientationdistributions of the edge images of (b), (d), and (f) of FIG. 4. (a) ofFIG. 5 illustrates the edge orientation distribution of (b) of FIG. 4,(b) of FIG. 5 illustrates the edge orientation distribution of (d) ofFIG. 4, and (c) of FIG. 5 illustrates the edge orientation distributionof (f) of FIG. 4.

(Details of how Prediction Set Determining Section 13 Operates andDetails of Prediction Set)

How the prediction set determining section 13 operates and details ofthe prediction set will be described below, more specifically, withreference to FIG. 6 and FIG. 7. As described above, the prediction setdetermining section 13 mainly determines, from a prediction set group, aprediction set to be applied to the target block to be encoded, based onthe edge information of the target block to be encoded, calculated bythe edge analysis section 12.

(Details of Prediction Set)

In the specification, the prediction set group is a group including Lpieces of prediction sets. Each prediction set i (0≦i≦L−1) in theprediction set group is a group including Ki pieces of prediction modeseach defining a different prediction method. Here, i indicates thenumber for identifying a prediction set.

Further, the prediction methods in the prediction set may be aprediction method, such as a plane prediction, a frequency prediction,or template matching, besides the spatial prediction defined by aprediction direction (edge orientation) θ and the DC prediction.Further, the number Ki (O≦i≦L−1) of prediction modes may be differentdepending on the prediction set i (0≦i≦L−1).

(Concrete Examples of Prediction Set Group and Prediction Set)

The following describes concrete examples of the prediction set groupand the prediction set, with reference to Table 2 and FIG. 6. Table 2shows one example of the prediction set group where the number L ofprediction sets is 4, and the number Ki of prediction modes is such thatK0=K1=K2=K3=9. In the present embodiment, each of “0” [deg], “−90”[deg], “±15” [deg], “±22.5” [deg], “±30” [deg], “±45” [deg], “±67.5”[deg], and “±75” [deg] in Table 2 indicate spatial predictions eachdefined by a prediction direction θ, and “DC” indicates a DC prediction.

TABLE 2 Prediction Set 0 1 2 3 Prediction Mode 0 −90 −90 −90 −90 1 0 0 00 2 DC DC DC DC 3 −45 −30 −60 −45 4 45 30 60 45 5 67.5 60 75 75 6 22.515 30 15 7 −67.5 −60 −75 −75 8 −22.5 −15 −30 −15

(a) through (d) of FIG. 6 illustrate prediction modes except for DCprediction in the prediction sets shown in Table 2. (a) through (d) ofFIG. 6 respectively correspond to prediction sets 0 through 3.

A prediction set 0 illustrated in (a) of FIG. 6 is the same as the intraprediction in the conventional technique, and therefore is not explainedhere.

A prediction set 1 illustrated in (b) of FIG. 6 is a prediction setwhich focuses on predictions in a horizontal direction and which iseffective for a case where edges are formed in the horizontal direction(around 0 [deg]) in a collective manner, as illustrated in (a) of FIG.5. An image in which edges are formed in the horizontal direction in acollective manner as such may be, for example, an image havinghorizontal stripes like the one illustrated in (a) of FIG. 4.

A prediction set 2 illustrated in (c) of FIG. 6 is a prediction setwhich focuses on predictions in a vertical direction and which iseffective for a case where edges are formed in the vertical direction(around ±90 [deg]) in a collective manner, as illustrated in (b) of FIG.5. An image in which edges are formed in the vertical direction in acollective manner as such may be, for example, an image having verticalstripes like the one illustrated in (c) of FIG. 4.

A prediction set 3 illustrated in (d) of FIG. 6 is a prediction setwhich focuses on predictions in a horizontal direction and in a verticaldirection and which is effective for a case where edges are formed bothin the horizontal direction (around ±90 [deg]) and in the verticaldirection (around 0 [deg]) in a collective manner. An image in whichedges are formed both in the vertical direction and in the horizontaldirection in a collective manner as such may be, for example, an imagehaving a twist pattern like the one illustrated in (e) of FIG. 4.

As described above, a plurality of prediction sets focusing onpredictions in specific directions different from each other, like theprediction sets 0 through 3, are predetermined so that a prediction setis selected from the predetermined prediction sets according to eachtarget block to be encoded. This makes it possible to carry outprediction in a direction in which a conventional image encoding devicecannot carry out prediction.

(Details of Process of Determining Prediction Set Information)

With reference to FIG. 7, the following describes a process ofdetermining prediction set information, more specifically. FIG. 7 is aflowchart specifically showing how the prediction set determiningsection 13 operates. Further, Table 3 shows definitions of parametersused for explanation about the operation of the prediction setdetermining section 13.

TABLE 3 Parameter Meaning of Parameter bk Counter Indicative of Numberof Sub Block in Target Block to be Encoded end_bk Number of Last SubBlock in Target Block to be Encoded set_num Counter Indicative of Numberof Prediction Set end_set_num Number of Last Prediction Setmin_sum_of_delta_angle Total Value of Minimum Values in Sums of AbsoluteValues of Delta Angles in All Sub Blocks sum_of_delta_angle Sum ofAblsolute Values of Delta [set_num] Angles in Prediction Set Numberset_num min_delta_angle Minimum Value in Sums of Ablsolute Values ofDelta Angles delta_angle Abvolute Value of Delta Angle edge_angle [bk]Edge Orientation of Sub Block Number bk in Target Block to be Encodedpred_angle Prediction Direction at Prediction Mode [set_num][mode_num]Number mode_num in Prediction Set Number set_num mode_num CounterIndicative of Prediction Mode Number

The prediction set determining section 13 receives edge informationedge_data( ) (Step S30), and sets a counter set_num to 0 andmin_sum_of_delta_angle to an initial value, so as to initialize them(Step S31). Subsequently, the prediction set determining section 13 setsa counter bk and sum_of_delta_angle[set_num] to zero and min_delta_angleto an initial value, so as to initialize them (Step S32).

The prediction set determining section 13 determines whether or not anedge strength edge_strength[bk] of a sub block (hereinafter alsoreferred to as a target sub block) in a target block to be encoded,indicated by the counter bk, is equal to or more than a threshold Th(Step S33). The threshold Th may be set in advance to a certain value,or may be set as needed.

If the edge_strength[bk] is equal to or more than the threshold Th (Yesin Step S33), the prediction set determining section 13 finds out, in aprediction set, a minimum value min_delta_angle (hereinafter referred toas a minimum absolute delta angle) among absolute values of delta anglesbetween an edge orientation edge_angle[bk] in the target sub block andprediction directions pred_angle[set_num] [mode_num] of respectiveprediction modes each indicated by a prediction mode number mode_num inthe prediction set indicated by a prediction set number set_num (StepS34). The calculation is carried out in accordance with the followingequation (19):

$\begin{matrix}{\mspace{79mu}{{Math}.\mspace{14mu} 9}} & \; \\{{{min\_ delta}{\_ angle}} = {\min\limits_{{mode\_ num} \in {set}}\mspace{14mu}\left\{ {{{{edge\_ angle}\;\lbrack{bk}\rbrack} - {{{pred\_ angle}\;\lbrack{set\_ num}\rbrack}\lbrack{mode\_ num}\rbrack}}} \right\}}} & (19)\end{matrix}$

In the equation (19), each of the values of the prediction directionsindicated by the prediction modes in the prediction sets shown in Table2 is substituted for the prediction directionpred_angle[set_num][mode_num]. For example, in the case of a predictionmode 6 (i.e., mode_num=6) in the prediction set 1 (i.e., set_num=1) inTable 2, the prediction direction is 15 [deg], and therefore,pred_angle[1][6] equals 15[deg].

After the prediction set determining section 13 finds out the minimumabsolute delta angle min_delta_angle as such, the prediction setdetermining section 13 multiplies the obtained min_delta_angle by aconstant α, and adds the resultant value to a costsum_of_delta_angle[set_num] (Step S35). The constant α is apredetermined weighting factor according to a magnitude of an absolutedelta angle.

Subsequently, the prediction set determining section 13 increments thecounter bk by 1 so as to set a subsequent sub block number (Step S36).The prediction set determining section 13 determines whether or not avalue of thus set counter bk is equal to or less than end_bk (Step S37).If the value of the counter bk is equal to or less than the end_bk,which is a number of a last sub block in the target block to be encoded(Yes in Step S37), the prediction set determining section 13 repeats theprocesses from Step S33. If the value of the counter bk is larger thanthe end_bk (No in Step S37), the prediction set determining section 13increments the counter set_num by 1 so as to set a subsequent predictionset number (Step S38).

The processes from Steps S32 to S38 are processes for calculating adegree of similarity that indicates how much the prediction directionsdefined in the prediction set indicated by the prediction set numberset_num are approximate to edge orientations of all sub blocks in thetarget block to be encoded. That is, the more the prediction directionsdefined in the prediction set are approximate to the edge orientationsof all the sub blocks in the target block to be encoded, the smaller thevalue of the degree of similarity sum_of_delta_angle[set_num] becomes.

Subsequently, the prediction set determining section 13 determines whichis larger, the prediction set indicated by the counter set_num or thelast prediction set number end_set_num (Step S39). If the counterset_num is not larger than the end_set_num (Yes in Step S39), theprocesses from Step S32 are repeated. If the counter set_num is largerthan the end_set_num (No in Step S39), the prediction set determiningsection 13 determines a prediction set indicated by the prediction setnumber set_num whose sum_of_delta_angle[set_num] is minimum among theprediction sets, as a prediction set pred_set to be applied to thetarget block to be encoded (Step S40). The prediction set determiningsection 13 outputs prediction set information indicative of thedetermined prediction set pred_set to the intra prediction section 10,the prediction mode determining section 11, and the relative predictionset information forming section 51 (Step S41). The prediction setpred_set is determined such that the number of the prediction set thattakes minimum sum_of_delta_angle[set_num] among the prediction sets isfound out in accordance with the following equation (20). In theequation (20), set_group indicates a prediction set group. A datastructure of the prediction set information is shown in Table 4.

$\begin{matrix}{\mspace{79mu}{{Math}.\mspace{14mu} 10}} & \; \\{{pred\_ set} = {\arg\;{\min\limits_{{set\_ num} \in {set\_ group}}\mspace{14mu}\left\{ {{sum\_ of}{\_ delta}{{\_ angle}\;\lbrack{set\_ num}\rbrack}} \right\}}}} & (20)\end{matrix}$

TABLE 4 Syntax Detail prediction_set_data( ){ Prediction Set Information pred_set Indicative of Any of Prediction Sets }

(Process of Encoding Prediction Set Information)

The following deals with a process of encoding the prediction setinformation, more specifically. The relative prediction set informationforming section 51 predicts, based on prediction set information thathas been already encoded, prediction set information to be applied tothe target block to be encoded, which prediction set information isdetermined by the prediction set determining section 13, and outputs, tothe entropy encoding section 4, information (hereinafter referred to asrelative prediction set information) in which the prediction set isindicated by a flag and a difference based on the prediction. Theentropy encoding section 4 may carry out entropy encoding directly withrespect to the prediction set information, instead of the relativeprediction set information.

Table 5 shows a data structure of the relative prediction setinformation. In Table 5, probable_pred_set_flag inrelative_prediction_set_data( ) is a flag indicative of whether or notthe prediction set to be applied to the target block to be encoded isidentical with the predicted prediction set. Further, rem_pred_set isinformation indicative of which one of the prediction sets except for apredicted prediction set probable_pred_set used for the predictioncorresponds to the prediction set to be applied to the target block tobe encoded. The relative prediction set information may be a value ofthe prediction set pred_set to be applied to the target block to beencoded, or a difference between the value of the prediction setpred_set to be applied to the target block to be encoded and a value ofthe probable_pred_set, which is a prediction value.

TABLE 5 Syntax Detail relative_prediction_set_data( ) RelativePrediction Set Information  probable_pred_set_flag Flag Indicative ofWhether or not Determined Prediction Set is Identical with PredictionValue of Prediction Set  if(probable_pred_set_flag !=1){ If DeterminedPrediction Set is Different from Prediction Value of Prediction Set, Addthe Following Information  rem_pred_set Indicative of Which One ofPrediction Sets Except for Prediction Value of Prediction SetCorresponds to Determined Prediction Set  } }

(Arrangement of Relative Prediction Set Information Forming Section 51)

The following describes an arrangement of the relative prediction setinformation forming section 51, with reference to FIG. 8, followed byexplanation of how the relative prediction set information formingsection 51 operates. FIG. 8 is a block diagram showing the arrangementof the relative prediction set information forming section 51. Therelative prediction set information forming section 51 includes arelative prediction set information generation section 511, a predictionset information predicting section 512, and a prediction set informationstoring section 513. Each of the constituent components is described asfollows.

(Relative Prediction Set Information Generation Section 511)

The relative prediction set information generation section 511 predictsprediction set information, based on a prediction value determined inthe prediction set information section 512, and outputs relativeprediction set information.

(Prediction Set Information Predicting Section 512)

The prediction set information predicting section 512 determines aprediction value of a prediction set, which is to be applied to thetarget block to be encoded, based on encoded prediction set informationstored in the prediction set information storing section 513, andoutputs the prediction value.

The prediction value of a prediction set, which is to be applied to thetarget block to be encoded, is determined by any of the followingmethods (1) through (5). FIG. 9 illustrates positions of blocks used forpredicting the prediction set information, for easy understanding of howthe blocks are positioned in an image region.

-   (1) A prediction set that has the highest appearance frequency among    prediction sets applied to blocks (60 a through 60 k) positioned in    the vicinity of a target block 61 to be encoded, shown in FIG. 9, is    taken as the prediction value.-   (2) A median of prediction sets applied to blocks (60 a through 60    c, or 60 a, 60 c, and 60 d) positioned in the vicinity of the target    block 61 in FIG. 9 is taken as the prediction value.-   (3) A prediction set applied to an encoded block (60 a) positioned    on the left of the target block 61 in FIG. 9 is taken as the    prediction value.-   (4) A prediction set applied to an encoded block (60 c) positioned    on the upper side of the target block 61 in FIG. 9 is taken as the    prediction value.-   (5) A prediction set that has the highest appearance frequency among    prediction sets applied to blocks that have been already encoded in    a target frame to be encoded, before the target block 61 is encoded,    in FIG. 9, (that is, in FIG. 9, all blocks constituting an encoded    image region 60, i.e., a region surrounded by encoded blocks 60 s,    60 t, 60 u, 60 v, 60 a, 60 b, 60 c, and 60 d) is taken as the    prediction value.

If there is no prediction set information that has been already encoded,a predetermined prediction set is set as the probable_pred_set.

(Prediction Set Information Storing Section 513)

The prediction set information storing section 513 received predictionset information and stores it therein.

(Details of Process of Predicting Prediction Set Information)

With reference to FIG. 10, the following explains about a process ofpredicting prediction set information, more specifically. FIG. 10 is aflowchart showing the process of predicting prediction set information,in the relative prediction set information forming section 51.

The prediction set information predicting section 512 determines aprediction value of a prediction set, based on encoded prediction setinformation that has been already encoded and stored in the predictionset information storing section 513, and outputs the prediction value(Step S50). Subsequently, prediction set information received by therelative prediction set information forming section 51 is supplied tothe prediction set information storing section 513 and the relativeprediction set information generation section 511 (Step S51). Theprediction set information storing section 513 stores the prediction setinformation therein (Step S52). The relative prediction set informationforming section 511 compares the prediction set pred_set to be appliedto the target block to be encoded and the prediction valueprobable_pred_set of a prediction set (Step S53). The prediction valueis determined by any one of the above methods (1) through (5).

If the prediction set pred_set is identical with the prediction valueprobable_pred_set of a prediction set (Yes in Step S53), the relativeprediction set information generation section 511 sets informationindicative of “identical” as probable_pred_set_flag(probable_pred_set_flag=1) (Step S54), and outputs the information asrelative prediction set information to the entropy encoding section 4(Step S58).

If the prediction set pred_set is different from the prediction setprobable_pred_set (No in Step S53), the relative prediction setinformation generation section 511 sets information indicative of “notidentical” as probable_pred_set_flag (probable_pred_set_flag=0), andfinds information (rem_pred_set) indicative of which one of theremaining prediction sets corresponds to the prediction set of thetarget block.

More specifically, the relative prediction set information generationsection 511 compares a value of the pred_set and the prediction valueprobable_pred_set (Step S55). If the pred_set is smaller than theprobable_pred_set (Yes in Step S55), the relative prediction setinformation generation section 511 sets “probable_pred_set_flag=0” and“rem_pred_set=pred_set” as relative prediction set information (StepS56), and outputs the relative prediction set information (Step S58). Ifthe pred_set is not smaller than the probable_pred_set (No in Step S55),the relative prediction set information generation section 511 sets“probable_pred_set_flag=0” and “rem_pred_set=pred_set−1” as relativeprediction set information (Step S57), and outputs the relativeprediction set information (Step S58).

(Details of how to Generate Predicted Image from Prediction Direction θ)

The following describes how to generate a predicted image from aprediction direction 8, with reference to FIG. 11. FIG. 11 illustrateshow a predicted image of an N×N pixel block is generated if a pixelvalue I(xp, yp) positioned on a point P(xp, yp) on a X-Y plane ispredicted from a direction of a straight line 1 that passes through thepoint P. In FIG. 11, intersections of grids indicate positions ofinteger pixels and a region on X and Y axes indicates a reference pixelregion.

Furthermore, on the X-Y plane, a region that satisfies 0<x≦N and 0<y≦Nis regarded as a target pixel region to be predicted, and a region thatsatisfies (i) 0≦x≦L and u≦0, (ii) x≦0 and y≦0, or (iii) x≦0 and 0≦y≦K isregarded as an encoded pixel region, and the other region is consideredas an unencoded pixel region. A reference pixel region is a region thatsatisfies (iv) 0≦x≦L and y=0, (v) x=0 and y=0, or (vi) x=0 and 0≦y≦K, inthe encoded pixel region.

Further, there are 2 cases as prediction from a prediction direction:(a) a case where a pixel value of the point P is predicted from areference pixel region on a region (0≦x≦L and y=0); and (b) a case wherethe pixel value of the point P is predicted from a reference pixelregion on a region (x=0 and 0≦y≦K).

The aforementioned “N”, “L”, and “K” are explained below with referenceto (a) through (f) of FIG. 12. As illustrated in (a) through (f) of FIG.12, “N” indicates a height and a width of a target pixel region to bepredicted, and “L” and “K” indicate dimensions of a reference pixelregion. More specifically, “K” indicates a height of a reference pixelregion positioned on the left of the target pixel region to bepredicted, and “L” indicates a width of a reference pixel regionpositioned on the upper side of the target pixel region to be predicted.

As illustrated (a) through (f) of FIG. 12, each of “L” and “K” takes anyof 0, “N”, and “2N”. (a) through (f) of FIG. 12 illustrate examples ofreference pixel regions in which “L” and “K” take any of 0, “N”, and“2N”, respectively. However, these examples are illustrative only, and“L” and “K” may take a combination of values other than the valuesexemplified above.

Where a direction vector R of a prediction direction θ is (rx, ry), anintersection A of the X axis and the straight line 1 and an intersectionB of the Y axis and the straight line 1 are represented by the followingequations (21) and (22), respectively.

$\begin{matrix}{{Math}.\mspace{14mu} 11} & \; \\{{{Point}\mspace{14mu} A\text{:}\mspace{14mu}\left( {x_{a},y_{a}} \right)} = \left( {\frac{{r_{y}x_{p}} - {r_{x}y_{p}}}{r_{y}},0} \right)} & (21) \\{{{Point}\mspace{14mu} B\text{:}\mspace{14mu}\left( {x_{b},y_{b}} \right)} = \left( {0,\frac{{r_{x}x_{p}} - {r_{y}y_{p}}}{r_{x}}} \right)} & (22)\end{matrix}$

When the intersection A and the intersection B satisfy any of thefollowing conditions (1) through (4), the intersection A or B isregarded as a prediction pixel for the point P: (1) when the predictiondirection θ is such that −π/2≦θ≦φ, the intersection A is regarded as theprediction pixel; (2) when the prediction direction θ is such thatφ<θ≦0, the intersection B is regarded as the prediction pixel; (3) whenthe prediction direction θ is such that 0<θ<π/2, and xa≧0 and yb≦0, theintersection A is regarded as the prediction pixel; and (4) when theprediction direction θ is 0<θ<π/2, and xa<0 and yb≧0, the intersection Bis regarded as the prediction pixel. Here, φ satisfies −π/2<φ<0.

A prediction pixel value IA at the intersection A and a prediction pixelvalue IB at the intersection B can be obtained by an interpolationprocess such as linear interpolation using adjacent pixels orthree-dimensional interpolation. If the intersections A and B arepositioned at integer pixels, a filtering process with the use of ann-tap filter, such as a 3-tap filter, may be carried out.

In the case where the linear interpolation and the 3-tap filter areused, the prediction pixel values IA and IB, respectively at theintersections A and B, can be represented by the following equations(23) and (24), respectively. In the equations (23) and (24), Irec(x, y)indicates a pixel value of a locally decoded image. Floor{x} iscalculation for finding a maximum integer that is not larger than x, andCeil{x} is calculation for finding a minimum integer that is not smallerthan x. Z indicates a set of integers.

$\begin{matrix}{\mspace{79mu}{{Math}.\mspace{14mu} 12}} & \; \\{I_{A} = \left\{ {{\begin{matrix}\frac{{I_{rec}\left( {{x_{a} - 1},0} \right)} + {2\;{I_{rec}\left( {x_{a},0} \right)}} + {I_{rec}\left( {{x_{a} + 1},0} \right)}}{4} & {{{for}\mspace{14mu} x_{a}} \in Z} \\{{\left( {1 - \alpha} \right){I_{rec}\left( {{{Floor}\left\{ x_{a} \right\}},0} \right)}} + {\alpha\;{I_{rec}\left( {{{Ceil}\;\left\{ x_{a} \right\}},0} \right.}}} & {otherwise}\end{matrix}\mspace{79mu}\alpha} = {x_{a} - {{Floor}{\;\;}\left\{ x_{a} \right\rbrack}}} \right.} & (23) \\{I_{B} = \left\{ {{\begin{matrix}\frac{{I_{rec}\left( {0,{y_{b} - 1}} \right)} + {2\;{I_{rec}\left( {0,y_{b}} \right)}} + {I_{rec}\left( {0,{y_{b} + 1}} \right)}}{4} & {{{for}\mspace{14mu} x_{a}} \in Z} \\{{\left( {1 - \beta} \right){I_{rec}\left( {0,{{Floor}\left\{ y_{b} \right\}}} \right)}} + {\beta\;{I_{rec}\left( {0,{{Ceil}\;\left\{ y_{b} \right\}}} \right)}}} & {otherwise}\end{matrix}\mspace{79mu}\beta} = {y_{b} - {{Floor}\mspace{11mu}\left\{ y_{b} \right\rbrack}}} \right.} & (24)\end{matrix}$

In the equations (23) and (24), if pixels positioned at (Ceil{xa}, 0),(xa+1, 0), (0, Ceil{yb}), and (0, yb+1) are placed in the unencodedpixel region, a pixel value positioned at (L, 0) is used instead of(Ceil{xa}, 0) and (xa+1, 0), and a pixel value positioned at (0, K) isused instead of (0, Ceil{yb}) and (0, yb+1).

By applying the generation method of the prediction pixel of the pointP, which is in the target pixel region to be predicted, to all pointspositioned on integer pixels in the target pixel region to be predicted,it is possible to generate prediction pixels over the target pixelregion to be predicted.

In the present embodiment, an encoding unit of the prediction set is anM×M pixel block. However, the encoding unit is not limited to this. Forexample, a macro block, a slice, a picture (frame), or a GOP (Group OfPicture) may be also used as the encoding unit of the prediction set. Inthe case where the prediction set is changed per slice unit, forexample, it is necessary to encode information on a selected predictionset at a headmost part of the slice. The encoding unit of the predictionset may be determined, in advance, between an image encoding device andan image decoding device, or may be designated in a headmost piece ofencoded data, a picture, or a GOP header. Alternatively, it is alsopossible to notify the encoding unit by use of external means, not bythe image encoding device and the image decoding device.

Such a macro book, a slice, a picture (frame), and a GOP, in thespecification, are illustrated in (a) through (e) of FIG. 13. (a)through (e) of FIG. 13 schematically illustrate relations between theencoding units according to the present invention. (a) of FIG. 13illustrates the GOP, (b) of FIG. 13 illustrates the picture (frame), (c)of FIG. 13 illustrates the slice, (d) of FIG. 13 illustrates the macroblock, and (e) of FIG. 13 illustrates a sub block. In FIG. 13, the subblock is set such that M=2N, but is not limited to this. For example,the sub block may be set such that M=N, 2N, 4N, 8N, 16N, or the like.

(Effects)

As described above, the image encoding device 100 calculates edgeinformation of an image from each constituent block of the image. Theimage encoding device 100 calculates, for example, an edge orientationand an edge strength of the image, or distribution information thereof,as the edge information. The image encoding device selects a predictionset suitable to the calculated edge information from a prediction setgroup including a plurality of prediction sets having differentcombinations of a plurality of prediction modes corresponding todifferent prediction directions. The image encoding device then encodesthe image by use of the prediction set thus selected. For example, inthe case where the edge information indicates that edges are formed in ahorizontal direction in a collective manner, the image encoding deviceencodes the image by use of a prediction set that focuses on predictionsin the horizontal direction. On the other hand, in the case where theedge information indicates that edges are formed in a vertical directionin a collective manner, the image encoding device encodes the image byuse of a prediction set that focuses on predictions in the verticaldirection.

As such, the image encoding device 100 encodes an image by use of aprediction set optimal for the edge information of the image. Thisallows the image encoding device to carry out predictions from morevarious directions than the conventional technique, thereby making itpossible to reduce an encoding amount of the image and to improve imagequality.

Further, the image encoding device 100 can more flexibly select aprediction method because the prediction methods are expressedhierarchically by the prediction set information and the prediction modeinformation. As a result, it is possible to prevent that a necessaryencoding amount for the prediction method increases and to improveefficiency in prediction.

(Additional Matters)

The present embodiment deals with a case where the number L ofprediction sets is 4 and the number Ki of prediction modes is 9 (i=0, 1,2, 3), as an example of the prediction set group. However, theprediction set group is not limited to this. For example, the predictionset group may be such that the number L of prediction sets may be 5 or9, or an other natural number. Tables 6 and 7 show examples of theprediction set group and the prediction sets in which examples thenumbers L of prediction sets are 5 and 9, respectively. Table 6 shows anexample of the prediction set group and the prediction sets in which thenumber L of prediction sets is 5 and the number Ki of prediction modesis 9 (0≦i<5, iεinteger). Table 7 shows an example of the prediction setgroup and the prediction in which the number L of prediction sets is 9and the number Ki of prediction modes is 9 (0≦i<9, iεinteger).

TABLE 6 Prediction Set 0 1 2 3 4 Prediction Mode 0 −90 −90 −90 −90 −90 10 0 0 0 0 2 DC DC DC DC DC 3 −45 −30 −60 −15 −75 4 45 30 60 15 75 5 67.560 75 30 60 6 22.5 15 30 7.5 82.5 7 −67.5 −60 −75 −30 −60 8 −22.5 −15−30 −7.5 −82.5

TABLE 7 Prediction Set 0 1 2 3 4 5 6 7 8 Prediction Mode 0 −90 −90 −90−90 −90 −90 −90 −90 −90 1 0 0 0 0 0 0 0 0 0 2 DC DC DC DC DC DC DC DC DC3 −45 −25 −65 −30 −60 −20 −70 −15 −75 4 45 25 65 30 60 20 70 15 75 567.5 50 40 60 30 40 50 30 60 6 22.5 12.5 77.5 15 75 10 80 7.5 82.5 7−67.5 −50 −40 −60 −30 −40 −50 −30 −60 8 −22.5 −12.5 −77.5 −15 −75 −10−80 −7.5 −82.5

[Embodiment 2]

An image decoding device according to the present invention is describedbelow as Embodiment 2, with reference to FIG. 14 through FIG. 17. Thesame constituent components as in Embodiment 1 have the same referencesigns as in Embodiment 1, and are not explained here.

(Arrangement of Image Decoding Device 150)

An arrangement of an image decoding device 150 according to Embodiment 2is explained below with reference to FIG. 14. FIG. 14 is a block diagramshowing the arrangement of the image decoding device 150.

As shown in FIG. 14, the image decoding device 150 mainly includes anentropy decoding section 5, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 10, and a predictionset information forming section 52. In the present embodiment, only theentropy decoding section 5 and the prediction set information formingsection 52, which have not been described yet, will be explained.

(Entropy Decoding Section 5)

The entropy decoding section 5 carries out entropy decoding with respectto encoded data, such as prediction residual data, prediction modeinformation, and relative prediction set information, and outputsdecoded data.

(Prediction Set Information Forming Section 52)

The prediction set information forming section 52 forms prediction setinformation of a target block on the basis of the entropy-decodedrelative prediction set information and prediction set information thathas been already decoded. An arrangement and operation of the predictionset information forming section 52 will be described later.

(Overview of Image Decoding Process)

The following generally explains about an image decoding process in theimage decoding device 150, with reference to FIG. 15. FIG. 15 is aflowchart schematically showing the image decoding process in the imagedecoding device 150.

(Reception of Encoded Data and Formation of Prediction Set Information)

When the image decoding device 150 receives encoded data (M×M pixelblocks) (Step S60), the entropy decoding section 5 carries out entropydecoding with respect to relative prediction set information, in thereceived encoded data, on a prediction set to be applied to a targetimage to be decoded (an M×M pixel block, hereinafter referred to atarget block to be decoded) (Step S61). Then, the prediction setinformation forming section 52 forms prediction set information of atarget block to be decoded, on the basis of the entropy-decoded relativeprediction set information and prediction set information that has beenalready decoded (Step S62). A detailed process of forming the predictionset information in the prediction set information forming section 52will be described later.

(Decoding of Prediction Residual Data and Prediction Mode Information)

The entropy decoding section 5 further carries out entropy decoding withrespect to prediction mode information and a quantization value ofprediction residual data of each target sub block to be decoded (StepS63). The target sub block to be decoded has a predetermined block size(N×N pixel block) by which the target block is subdivided.

(Generation of Predicted Image)

The intra prediction 10 carries out intra prediction by use of a locallydecoded image of decoded adjacent sub blocks, which is stored in thememory 9, and generates a predicted image (N×N pixel block) according tothe prediction set information thus formed (decoded) and a predictionmode to be applied to the target sub block to be decoded, whichprediction mode is indicated by the prediction mode information thusdecoded (Step S64). How to generate the predicted image by intraprediction has been described in Embodiment 1, and therefore is notexplained here.

(Inverse Quantization and Inverse Orthogonal Transformation)

The inverse quantization 6 carries out inverse quantization with respectto the prediction residual data thus decoded in Step S63, and suppliesthe prediction residual data to the inverse orthogonal transformationsection 7 (Step S65). The inverse orthogonal transformation section 7carries out inverse orthogonal transformation with respect to theprediction residual data thus inverse-quantized, and supplies theprediction residual data to the addition computing section 8 (Step S66).

(Generation of Decoded Image of Target Sub Block)

The addition computing section 8 adds the predicted image generated inStep S64 to the prediction residual data received in Step S66, so as togenerate a decoded image (N×N pixel block) of the target sub block, andoutputs the decoded image (Step S67).

The memory 9 receives and then stores the outputted decoded image of thetarget sub block therein (Step S68).

(Additional Matters)

The image decoding device 150 repeats Steps S63 to S68 with respect toall sub blocks constituting the target block to be decoded, and alsorepeats Steps S60 to S68 with respect to all blocks constituting thetarget image to be decoded.

(Details of Prediction Set Information Forming Section 52)

The following deals with the prediction set information forming section52, more specifically.

The prediction set information forming section 52 carries out a processreverse to the process carried out by the relative prediction setinformation forming section 51. More specifically, the prediction setinformation forming section 52 forms prediction set information from therelative prediction set information and the prediction set informationthat has been already decoded.

(Arrangement of Prediction Set Information Forming Section 52)

An arrangement of the prediction set information forming section 52 isdescribed below with reference to FIG. 16. FIG. 16 is a block diagramshowing the arrangement of the prediction set information formingsection 52. The prediction set information forming section 52 includes aprediction set information generation section 521, a prediction setinformation predicting section 512, and a prediction set informationstoring section 513. The following describes the prediction setinformation generation section 521, which has not been described yet.

(Prediction Set Information Generation Section 521)

The prediction set information generation section 521 generatesprediction set information based on the relative prediction setinformation entropy-decoded by the entropy decoding section 5 and aprediction value determined by the prediction set information predictingsection 512, and then outputs the prediction set information.

(Details of Process of Forming Prediction Set Information)

A process of forming the prediction set information is more specificallydescribed below with reference to FIG. 17. FIG. 17 is a flowchartshowing the process of forming the prediction set information, in theprediction set information forming section 52.

The prediction set information predicting section 512 determines aprediction value probable_pred_set of a prediction set, which is to beapplied to the target block to be decoded, on the basis of theprediction set information that has been already decoded and stored inthe prediction set information storing section 513, and outputs thedetermined prediction value (Step S70). The prediction value of aprediction set to be applied to the target block to be decoded isdetermined in the same manner as in the determination of the predictionvalue of a prediction set in the image encoding device 100 of Embodiment1, and therefore is not described here.

Then, the relative prediction set information is supplied to theprediction set information generation section 521 (Step S71). Theprediction set information generation section 521 determines whether avalue of probable_pred_set_flag in the relative prediction setinformation thus received is “1” or not (Step S72). If the value ofprobable_pred_set_flag is “1” (Yes in Step S72), the prediction setinformation generation section 521 sets the prediction valueprobable_pred_set as a value of pred_set in prediction set informationprediction_set_data( ) indicative of the prediction set to be applied tothe target block to be decoded, and outputs the value of the pred_set(Step S73). That is, in this case, the pred_set equals to theprobable_pred_set.

If the value of the probable_pred_set_flag is “0” (No in Step S72), theprediction set information generation section 521 sets a value of thepred_set based on rem_pred_set and the probable_pred_set, and outputsthe value of the pred_set. More specifically, the prediction setinformation generation section 521 compares a value of the rem_pred_setwith the prediction value probable_pred_set (Step S74). If therem_pred_set is smaller than the probable_pred_set (Yes in Step S74),the pred_set is set such that pred_set=rem_pred_set (Step S75). If therem_pred_set is not smaller than the probable_pred_set (No in Step S74),the pred_set is set such that pred_set=rem_pred_set+1 (Step S76).

Subsequently, the prediction set information storing section 513 storesthe prediction set information prediction_set_data( ) thus decoded, andoutputs the prediction set information thus decoded (Step S77).

In the present embodiment, a decoding unit of the prediction set is anM×M pixel block. However, the decoding unit is not limited to this. Forexample, a macro block, a slice, a picture (frame), or a GOP (Group OfPicture) may be also used as the decoding unit of the prediction set. Ifthe prediction set is changed per slice unit, for example, it isnecessary to decode information on a selected prediction set at aheadmost part of the slice. The decoding unit of the prediction set maybe determined, in advance, between an image encoding device and an imagedecoding device, or may be designated in a headmost piece of encodeddata, a picture, or a GOP header. Alternatively, it is also possible tonotify the decoding unit by use of external means, not by the imageencoding device and the image decoding device.

Further, in the present embodiment, encoded data of the relativeprediction set information is entropy-decoded, and the prediction setinformation is formed from the relative prediction set information thusdecoded. However, it is also possible that, instead of the relativeprediction set information, encoded data of prediction set informationmay be entropy-decoded and the prediction set may be changed inaccordance with the prediction set information thus decoded.

(Effects)

As described above, the image decoding device 150 includes a predictionset group including a plurality of prediction sets having differentcombinations of a plurality of prediction modes corresponding todifferent prediction directions. The image decoding device 150 decodesprediction set information to be applied to a target block to be decodedin blocks constituting an image, by use of relative prediction setinformation and prediction set information that has been alreadydecoded. Then, the image decoding device 150 carries out intraprediction with respect to a target sub block by use of a locallydecoded image of an adjacent sub block. The intra prediction is carriedout on respective sub blocks into which the target block to be decodedis subdivided. Finally, the image decoding device 150 combines agenerated predicted image with decoded prediction residual data of thetarget sub block, so as to reconstruct an image of the target sub block.

In the arrangement, in the case where the prediction set informationthus decoded indicates a prediction set that focuses on predictions in ahorizontal direction, it is possible to generate a predicted image frommore specific angles with the horizontal direction as a centerdirection. Further, in the case where the prediction set informationthus decoded indicates a prediction set that focuses on predictions in avertical direction, it is possible to generate a predicted image frommore specific angles with the vertical direction as a center direction.That is, the arrangement allows the image decoding device 150 to carryout a decoding process using predictions from more various angles thanthe conventional technique, thereby making it possible to reproduce anedge portion more efficiently. This allows reconstructing of an imagehaving improved image quality.

Moreover, the image decoding device 150 carries out prediction at twostages of the prediction set and the prediction mode, thereby making itpossible to prevent an increase in an encoding amount and to realizehigh accuracy in prediction.

[Embodiment 3]

Another embodiment of the image encoding device according to the presentinvention is explained below as Embodiment 3, with reference to FIG. 18through FIG. 25. The same constituent components as in Embodiments 1 and2 have the same reference signs as in Embodiments 1 and 2, and are notexplained here. Embodiment 1 describes an image encoding device in whichthe prediction set is changed per predetermined pixel block unitaccording to an edge orientation of a target block to be encoded, sothat the image encoding device can carry out more various predictionsthan the conventional technique. Embodiment 3 deals with an imageencoding device (i) which forms prediction sets in each of which acombination of prediction modes is automatically determined inaccordance with an image and (ii) which selects a prediction set fromthe prediction sets thus formed, according to an edge orientation of atarget block to be encoded, so that the image encoding device canfurther improve efficiency in prediction.

(Arrangement of Image Encoding Device 200)

An arrangement of an image encoding device 200 according to the presentembodiment, with reference to FIG. 18. FIG. 18 is a block diagramshowing the arrangement of the image encoding device 200 according tothe present embodiment. As shown in FIG. 18, the image encoding device200 mainly includes a difference computing section 1, an orthogonaltransformation section 2, a quantization section 3, an inversequantization section 6, an inverse orthogonal transformation section 7,an addition computing section 8, a memory 9, an intra prediction section210, a prediction mode determining section 211, an entropy encodingsection 204, an edge analysis section 212, a prediction set determiningsection 213, a relative prediction set information forming section 51, aprediction set definition determining section 214, and a relativeprediction set definition information forming section 53. The presentembodiment describes only the entropy encoding section 204, theprediction mode determining section 211, the edge analysis section 212,the prediction set determining section 213, the prediction setdefinition determining section 214, and the relative prediction setdefinition information forming section 53, which have not been describedin Embodiments 1 and 2.

(Edge Analysis Section 212)

The edge analysis section 212 calculates an edge strength and an edgeorientation (hereinafter collectively referred to as edge information).More specifically, the edge analysis section 212 calculates edgeinformation per sub block (an inputted target frame to be encoded issubdivided into sub blocks, each an N×N pixel block), and outputs piecesof edge information of all sub blocks constituting the inputted targetframe to be encoded.

(Prediction Set Definition Determining Section 214)

The prediction set definition determining section 214 determinesdefinitions (prediction modes included in each prediction set) of aplurality of prediction sets to be applied to the target frame to beencoded, based on the edge information of the target frame, calculatedin the edge analysis section 212. The prediction set definitiondetermining section 214 then updates a table (Table 2) of predictionmodes and prediction sets, which table is referred to by the intraprediction section 210, the prediction mode determining section 211, andthe prediction set determining section 213. Subsequently, the predictionset definition determining section 214 outputs prediction set definitioninformation prediction_method_data( ) indicative of the table of theprediction modes and prediction sets.

(Relative Prediction Set Definition Information Forming Section 53)

The relative prediction set definition information forming section 53predicts, from prediction set definition information that has beenalready encoded, definition information of the prediction sets to beapplied to the target frame to be encoded, which is determined by theprediction set definition determining section 214, and outputs relativeprediction set definition information.

(Entropy Encoding Section 204)

The entropy encoding section 204 carries out entropy encoding withrespect to prediction residual data, prediction mode information,relative prediction set information, and the relative prediction setdefinition information, and outputs thus encoded data.

(Prediction Set Determining Section 213)

The prediction set determining section 213 determines, based on the edgeinformation received from the edge analysis section 212, a predictionset to be applied to a target block to be encoded, from the plurality ofprediction sets in the prediction set definition information receivedfrom the prediction set definition determining section 214. Theprediction set determining section 213 then outputs prediction setinformation indicative of the prediction set thus determined. How todetermine the prediction set is the same as in Embodiment 1, andtherefore is not explained in the present embodiment.

(Prediction Mode Determining Section 211)

The prediction mode determining section 211 determines one predictionmode to be used for prediction of the target block to be encoded, fromthe plurality of prediction modes defined by the prediction setdefinition information and the prediction set information thus received,based on an original image of the target block to be encoded and alocally decoded image supplied from the memory 9. The prediction modedetermining section 211 then supplies prediction mode informationindicative of the prediction mode thus determined to the intraprediction section 210 and the entropy encoding section 204. How todetermine the prediction mode is the same as in Embodiment 1, andtherefore is not described in the present embodiment.

(Intra Prediction Section 210)

The intra prediction section 210 carries out intra prediction indicatedby the prediction set information, the prediction set definitioninformation, and the prediction mode information, with the use of thelocally decoded image stored in the memory 9, so as to generate apredicted image.

(Overview of Image Encoding Process)

The following generally describes an image encoding process in the imageencoding device 200, with reference to FIG. 19. FIG. 19 is a flowchartschematically showing the image encoding process in the image encodingdevice 200.

(Reception of Target Frame to be Encoded and Calculation of EdgeInformation)

When the image encoding device 200 receives a frame (hereinafterreferred to as a target frame to be encoded) constituted by a pluralityof M×M pixel blocks (Step S80), the edge analysis section 212 subdividesthe target frame to be encoded into sub blocks (N×N pixel blocks, N≦M)(Step S81), and calculates edge information for each of the sub blocksconstituting the target frame to be encoded (Step S82).

(Determination of Prediction Set Definition Information and Encoding ofPrediction Set Definition Information)

Subsequently, the prediction set definition determining section 214determines, based on the edge information calculated in Step S82,respective prediction methods to be assigned to a plurality ofprediction modes included in prediction sets to be applied to the targetframe to be encoded, and updates the table of prediction modes andprediction sets. Then, the prediction set definition determining section214 supplies information (hereinafter referred to as prediction setdefinition information) indicative of combinations of the predictionmodes thus determined of the prediction sets to the intra predictionsection 210, the prediction mode determining section 211, the predictionset determining section 213, and the relative prediction set definitioninformation forming section 53 (Step S83). How to determine theprediction set definition will be described later, more specifically.The prediction methods encompass a DC prediction, template matching, anda prediction method based on a prediction direction.

The relative prediction set definition information forming section 53predicts prediction set definition information on the basis ofprediction set definition information that has been already encoded, andoutputs relative prediction set definition information (Step S84). Anarrangement of the relative prediction set definition informationforming section 53 and a process of predicting the prediction setdefinition information will be described later, more specifically.

The entropy encoding section 204 carries out encoding entropy withrespect to the relative prediction set definition information receivedfrom the relative prediction set definition information forming section53, and outputs encoded data of the relative prediction set definitioninformation (Step S85).

(Determination of Prediction Set and Encoding of Prediction SetInformation)

The prediction set determining section 213 determines a prediction setto be applied to each of the M×M pixel blocks (hereinafter referred toas a target block to be encoded) constituting the target frame to beencoded, based on the edge information calculated in Step S82, andsupplies information (hereinafter also referred to as prediction setinformation) indicative of the prediction set thus determined to theprediction mode determining section 211, the relative prediction setinformation forming section 51, and the intra prediction section 210(Step S86).

The relative prediction set information forming section 51 receives theprediction set information from the prediction set determining section213, predicts prediction set information based on prediction setinformation that has been already encoded, and supplies relativeprediction set information to the entropy encoding section 204 (StepS87). The entropy encoding section 204 carries out entropy encoding withrespect to the relative prediction set information, and outputs thusencoded data of the relative prediction set information (Steps S88). Howto determine the prediction set, how to encode the prediction setinformation, and a data structure of the prediction set information arethe same as in Embodiment 1.

(Determination of Prediction Mode and Encoding of Prediction ModeInformation)

The prediction mode determining section 211 subdivides the target blockto be encoded into N×N pixel blocks, so as to obtain sub blocks(hereinafter referred to as a target sub block to be encoded). Theprediction mode determining section 211 receives, from the memory 9, alocally decoded image of adjacent sub blocks that have been alreadyencoded, and determines, based on the locally decoded image thusreceived, an optimal prediction mode to be applied to the target subblock to be encoded, from prediction modes in the prediction setindicated by the prediction set information received from the predictionset determining section 213. The prediction mode determining section 211determines the optimal prediction mode with reference to the predictionset definition information updated by the prediction set definitiondetermining section 214. Then, the prediction mode determining section211 supplies prediction mode information to the intra prediction section210 and the entropy encoding section 204 (Step S89).

The entropy encoding section 204 carries out entropy encoding withrespect to the prediction mode information thus received, and outputsencoded data of the prediction mode information (Step S90).

(Generation of Predicted Image)

The intra prediction section 210 receives, from the memory 9, a locallydecoded image of adjacent sub blocks that have been already encoded. Theintra prediction section 210 then carries out intra prediction definedby the prediction set information determined in Step S86 and theprediction mode information determined in Step S89, with the use of thelocally decoded image thus received and with reference to the predictionset definition information determined in Step S83, so as to generate apredicted image of the target sub block to be encoded. The intraprediction section 210 supplies the predicted image to the differencecomputing section 1 and the addition computing section 8 (Step S91).

(Calculation of Prediction Residual Data)

The difference computing section 1 calculates prediction residual data(N×N pixel block), which is a difference between the received target subblock to be encoded and the predicted image thus generated in Step S91,and outputs the prediction residual data (Step S92).

(Orthogonal Transformation and Quantization)

The prediction residual data thus calculated in Step S92 is supplied tothe orthogonal transformation section 2 and then to the quantizationsection 3 so as to be subjected to orthogonal transformation andquantization, respectively. The prediction residual data is thensupplied to the entropy encoding section 204 and the inversequantization section 6 (Step S93).

(Inverse Orthogonal Transformation and Inverse Quantization)

The prediction residual data thus subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization section 6 and then to the inverse orthogonal transformationsection 7 so as to be subjected to inverse quantization and inverseorthogonal transformation, respectively. The prediction residual data isthen supplied to the addition computing section 8 (Step S94).

(Generation of Locally Decoded Image)

The addition computing section 8 adds the prediction residual data thussubjected to the inverse quantization and the inverse orthogonaltransformation in Step S94, to the predicted image generated in StepS91, so as to generate a locally decoded image of the N×N pixel block(Step S95). The locally decoded image thus generated is then stored inthe memory 9.

(Encoding of Prediction Residual Data)

The entropy encoding section 204 carries out entropy encoding withrespect to the quantized prediction residual data of the target subblock, and outputs encoded data of the prediction residual data (StepS96).

The processes from Step S89 to Step S96 are carried out with respect toall sub blocks constituting an M×M pixel block. Further, the processesfrom Step S86 to Step S96 are carried out with respect to all blocksconstituting the target frame to be encoded. Furthermore, the processesfrom Step S80 to Step S96 are carried out with respect to all framesconstituting the target image to be encoded.

(Additional Matters)

In the present embodiment, the encoding process of the image encodingdevice 200 is explained in the order from Step S80 to Step S96. However,the order of the steps is not limited to this, and can be altered aslong as the present invention can be carried out.

(Details of how to Determine Prediction Set Definition)

The following deals with how the prediction set definition determiningsection 214 operates, more specifically. The prediction set definitiondetermining section 214 determines respective prediction methods to beassigned to prediction modes in each of a plurality of prediction setsto be applied to the target frame to be encoded, based on the edgeinformation calculated by the edge analysis section 212. The predictionset definition determining section 214 then outputs prediction setdefinition information indicative of the prediction methods thusassigned.

How to determine the prediction set definition information is morespecifically described below with reference to FIG. 20. FIG. 20 is aflowchart specifically showing a determination process of the predictionset definition information.

(Reception of Edge Information)

The edge analysis section 212 supplies edge information of the targetframe to be encoded to the prediction set definition determining section214 (Step S100).

(Calculation of Edge Orientation Histogram)

The prediction set definition determining section 214 calculates, basedon the received edge information, an edge orientation histogram f(θ) ofblocks (N×N pixel blocks) each having an edge strength that is not lessthan a predetermined threshold Th, and then finds edge orientationhistogram information histogram_data( ) (Step S101). The threshold Thmay be set to a certain value in advance, or may be set as necessary.Further, the edge orientation histogram shows appearance frequency ofedge orientations in angles from −90 [deg] to 89 [deg] where the edgeorientation is expressed by an angle unit 1 [deg], for example. FIG. 21shows an edge orientation histogram obtained when edges are formed in ahorizontal direction in a collective manner, as an example. Further,Table 8 shows a data structure of the edge orientation histograminformation, more specifically. In Table 8, angle_idx indicates an indexindicative of an angel of an edge orientation, and total_angel_idxindicates an index indicative of the number of partitions of angles.

TABLE 8 Syntax Detail histogram_data( ){ Edge Orientation HistorgarmInformation  total_block_number Total Number of N×N Pixel BlocksConstituting Target Slice to be Encoded  nonplane_block_number TotalNumber of N×N Pixel Blocks Having Edge Strength Which is not Less thanPredetermined Threshold  for(angel_idx=0; angle_idx<total_angle_idx;angle_idx++){   histogram_of_edge_orientation[angle_idx] AppearanceFrequency of Edge Orientation for angle_idx  } }

(Calculation of Edge Orientation Cumulative Frequency Distribution)

The prediction set definition determining section 214 calculates an edgeorientation cumulative frequency distribution based on the edgeorientation histogram information thus found in Step S101 (Step S102).For example, when the edge orientation is expressed by the angle unit 1[deg], the edge orientation cumulative frequency distribution in a rangefrom −90 [deg] to an edge orientation θ [deg] is calculated by thefollowing equation (25). By calculating edge orientation cumulativefrequency with respect to all edge orientations from −90 [deg] to 89[deg], an edge orientation cumulative frequency distribution F(θ) can beobtained. As such, the edge orientation cumulative frequencydistribution shown in FIG. 22 can be obtained from the edge orientationhistogram shown in FIG. 21. FIG. 22 is a graph that is normalized by thenumber of blocks having an edge strength that is not less than apredetermined threshold.

$\begin{matrix}{{{Math}.\mspace{14mu} 13}\;} & \; \\{{F(\theta)} = {\sum\limits_{\phi = {- 90}}^{\theta}\;{f(\phi)}}} & (25)\end{matrix}$

(Calculation of Edge Orientation Distribution with Respect to CumulativeFrequency)

The prediction set definition determining section 214 then calculates adistribution (inverse function of the edge orientation cumulativefrequency distribution) G(x) of edge orientations with respect to thecumulative frequencies, with the use of the edge orientation cumulativefrequency distribution thus calculated in Step S102 (Step S103).

(Determination of Central Direction in Prediction Directions to beAssigned)

The prediction set definition determining section 214 then determineswhich direction is to be set as a central direction in assigningprediction directions, with the use of the edge orientation cumulativefrequency distribution calculated in Step S102 (Step S104). Morespecifically, the prediction set definition determining section 214determines which direction is to be set as the central direction, ahorizontal direction (0 [deg]) or a vertical direction (−90 [deg]), soas to determine prediction directions, on the basis of an edgeconcentration degree S(θc, Δθ) expressed by the following equation (26).The edge concentration degree S(θc, Δθ) indicates appearance frequencyof an edge orientation appearing in a range of ±Δθ [deg] with an edgeorientation θc [deg] as a center of the range. Further, F(θ) indicatesan edge orientation cumulative frequency in the edge orientation θ.

Math. 14S(θ_(c),Δθ)=F(θ_(c)+Δθ)−F(θ_(c)−Δθ)  (26)

In cases where an edge concentration degree S(0, Δθ) of a horizontaldirection is not less than an edge concentration degree S(−90, Δθ) of avertical direction, prediction directions with the horizontal direction(0 [deg]) as a central direction are assigned. In the other cases,prediction directions with the vertical direction (−90 [deg]) as acentral direction are assigned.

(Determination of Prediction Methods to be Assigned to RespectivePrediction Modes)

The prediction set definition determining section 214 determinesrespective prediction methods to be assigned to respective predictionmodes, based on (i) the edge orientations with respect to the cumulativefrequencies, calculated in Step S103, (ii) the center θc [deg] of theprediction directions determined in Step S104, and (iii) a predeterminedprediction method table (Table 10) (Step S105).

More specifically, a prediction direction θn [deg] having an anglelarger than the center θc [deg] in the prediction directions isdetermined by the following recurrence equation (27) and a predictiondirection θn [deg] having an angle smaller than the center θc [deg] inthe prediction directions is determined by the following recurrenceequation (28), in such a manner that a difference (threshold) betweenedge orientation cumulative frequencies of adjacent predictiondirections (θn and θn+1) becomes d. When n=0, θ0 is set such that θ0=θc,and d is a value obtained by dividing a maximum value in the cumulativefrequencies by the total number of the prediction directions. Apositional relation between θn and θn+1 is shown in FIG. 23. θnsatisfies the following expression (29). Further, a cumulativeprobability F′(θ) of an edge orientation is one obtained by normalizingthe cumulative frequency F(θ) of the edge orientation.

Math. 15θ_(n+1) =G(F(θ_(n))+d)(n+1>0)  (27)θ_(n−1) =G(F(θ_(n))−d)(n−1<0)  (28)−90 [deg]≦θ _(n)<90 [deg],θ_(n)≠θ_(m)(n≠m)  (29)

The following deals with an example of how to determine a predictiondirection θn in the edge orientation cumulative frequency distributionin FIG. 22. In this example, the number L of prediction sets is 3; thenumber K of prediction modes is 9; 0 [deg], −90 [deg], and DC predictionare assigned, in advance, respectively to mode numbers 0, 1, and 2 ineach of the prediction sets; and prediction directions (18 directions)to be assigned to the remaining mode numbers 3 through 8 in theprediction sets are to be determined.

In FIG. 22, since many edges are formed in a horizontal direction (0[deg]), prediction directions are determined so that a difference(threshold) between edge orientation cumulative probabilities ofprediction directions becomes even with the horizontal direction (0[deg]) as a center. In this case, taking into consideration that thenumber of prediction directions to be determines is 18 and there are 2predetermined prediction directions 0 [deg] and −90 [deg], thedifference (threshold) d between the edge orientation cumulativeprobabilities of the prediction directions is set to 5.0 [%](=100/(18+2)). Subsequently, angles that cause the difference betweenthe cumulative probabilities of the prediction directions to be 5.0 [%]when an initial value is set to an angle 0 [deg] are calculated inaccordance with the edge orientation distribution with respect to thecumulative frequency, and the above equations (27) and (28). In thisway, the prediction direction θn is obtained as shown in Table 9.

TABLE 9 (a) n 1 2 3 4 5 6 7 8 9 θn [deg] 0.5 1 2 4 8 12 15 40 72 (b) n−1 −2 −3 −4 −5 −6 −7 −8 −9 θn [deg] −1 −2 −4 −7 −11 −15 −20 −38 −60

Based on Table 10 showing how to assign prediction directions θn, thepositive prediction directions θn ((a) of Table 9) thus obtained areassigned to mode numbers 3, 5, and 7 in each of the prediction sets, inthe ascending order. Further, the negative prediction directions θn ((b)of Table 9) thus obtained are assigned to mode numbers 4, 6, and 8 ineach of the prediction sets, in the descending order. An example of thedefinitions of the prediction sets obtained as such is shown in Table11. Further, the determined definitions of the prediction sets arestored in a data structure of prediction set definition informationprediction_method_data( ) shown in Table 12. In Table 12, total_setindicates the total number of prediction sets, and total_mode indicatesthe total number of prediction modes included in a prediction set. Theprediction sets and the prediction modes in Table 11 are referred to bythe intra prediction section 210, the prediction mode determiningsection 211, and the prediction set determining section 214. Aprediction method number in a table, shown in Table 13, that defines aprediction method in advance may be set to a prediction methodpred_method[set_idx][mode_idx] to be assigned to a prediction modemode_idx in a prediction set set_idx in the prediction set definitioninformation. In Table 13, prediction methods, such as a planeprediction, a frequency-domain prediction, or template matching, may bedefined. The prediction set definition information may be information onprediction sets and prediction modes in which prediction methods arepartially altered. An example of the prediction set definitioninformation may be information on prediction directions θn of the modenumbers 3 through 8 in the prediction set numbers 0 through L−1 in Table10. Further, the prediction set definition information may be such thatthe total number of prediction sets used per predetermined unit isvariable. In this case, the prediction set definition information alsoincludes information on the number of prediction sets.

TABLE 10 Prediction Set 0 1 2 . . . 4 Prediction Mode 0  0  0  0 . . . 0 1 −90 −90 −90 −90 2 DC DC DC DC 3 θ₁ θ₂ θ₃ θ_(L) 4 θ⁻¹ θ⁻² θ⁻³ θ_(−L)5 θ_(L+1) θ_(L+2) θ_(L+3) θ_(2L) 6 θ_(−L−1) θ_(−L−2) θ_(−L−3) θ_(−2L) 7θ_(2L+1) θ_(2L+2) θ_(2L+3) θ_(3L) 8 θ_(−2L−1) θ_(−2L−2) θ_(−2L−3)θ_(−3L)

TABLE 11 Prediction Set 0 1 2 Prediction Mode 0 0 0 0 1 −90 −90 −90 2 DCDC DC 3 0.5 1 2 4 −1 −2 −4 5 4 8 12 6 −7 −11 −15 7 15 40 72 8 −20 −38−60

TABLE 12 Syntax Detail prediction_method_data( ){ Prediction SetDefinition Information  for(set_idx=0; set_idx<total_set;set++){ AddFollowing Information about All Prediction Sets  for(mode_idx=0;mode_idx<total_mode; Add Following information  mode++){ about AllPrediction Modes   pred_method[set_idx] Indicative of Prediction MethodApplied to Mode mode_idx in Prediction Set  }  } }

TABLE 13 Prediction Prediction Direction Vector Method Number Direction[deg] X Component Y Component 0 DC Prediction — — 1 −90 0 2 −87.5cos(−87.5) sin(−87.5) 3 −85 cos(−85) sin(−85) . . . . . . . . . . . . K180(K − 1)/ cos(180(K − 1)/ sin(180(K − 1)/ (L − 1) − 90 (L − 1) − 90)(L − 1) − 90) . . . . . . . . . . . . 71  85 cos(85) sin(85) 72  87.5cos(87.5) cos(87.5)

(Output of Prediction Set Definition Information)

The prediction set definition determining section 124 outputs theprediction set definition information thus determined in S105 (StepS106).

As such, it is possible to determine more specific prediction directionswith respect to a direction in which edges are formed in a collectivemanner.

(Process of Encoding Prediction Set Definition Information)

The following describes a process of encoding the prediction setdefinition information, more specifically. The relative prediction setdefinition information forming section 53 predicts, based on predictionset definition information that has been already encoded, information(prediction set definition information) indicative of definitions ofprediction sets to be applied to the target frame to be encoded, whichdefinitions are determined by the prediction set definition determiningsection 214. The relative prediction set definition information formingsection 53 forms relative prediction set definition information,accordingly. The entropy encoding section 204 may carry out entropyencoding directly with respect to the prediction set definitioninformation instead of the relative prediction set definitioninformation.

(Arrangement of Relative Prediction Set Definition Information FormingSection 53)

Initially explained is an arrangement of the relative prediction setdefinition information forming section 53 with reference to FIG. 24.FIG. 24 is a block diagram showing the arrangement of the relativeprediction set definition information forming section 53. The relativeprediction set definition information forming section 53 includes arelative prediction set definition information generation section 531, aprediction set definition information predicting section 532, and aprediction set definition information storing section 533 (FIG. 24).

(Relative Prediction Set Definition Information Generation Section 531)

The relative prediction set definition information generation section531 predicts received prediction set definition information based onprediction values (determined by the prediction set definitioninformation predicting section 532) that are determined based onprediction set definition information that has been already encoded, andoutputs relative prediction set definition information. A data structureof the relative prediction set definition information is shown in Table14.

TABLE 14 Syntax Detail relative_prediction_method_data( ) RelativePrediction Set Definition Information  for(set_idx=0; set_idx<total_set;set_idx++){ Add Following Information about All Prediciton Sets for(mode_idx=0; mode idx<total_mode; mode_idx++){ Add Followinginformation about All Prediction Modes  probable_pred_method_flag[set_idx][mode_idx] Flag Indicative ofWhether or not Determined Prediction Method is Identical with PredictionValue of Prediction Method  if(probable_pred_method_flag[set_idx][mode_idx]!=1){ If DeterminedPrediction Method is Different from Prediction Value of PredictionMethod, Add Following Information   rem_pred_method[set_idx][mode_idx]Indicative of Which One of Prediction Methods Except for PredictionValue of Prediction Method Corresponds to Determined Prediction Method  }  }  } }

Other than the above data structure, the relative prediction setdefinition information may be: values of prediction methodspred_method[set_idx][mode_idx] indicated by the prediction modesmode_idx in each of the prediction sets set_idx to be applied to thetarget frame to be encoded; or different values each between aprediction value probable_pred_method[set_idx][mode_idx] and a value ofa prediction method pred_method[set_idx][mode_idx] indicated by aprediction mode mode_idx in each of the prediction sets set_idx to beapplied to the target frame to be encoded.

(Prediction Set Definition Information Predicting Section 532)

The prediction set definition information predicting section 532determines prediction values of prediction set definition information,which are to be applied to the target frame to be encoded, base onprediction set definition information that has been already encoded andstored in the prediction set definition information storing section 533,and outputs the prediction values thus determined.

The predicting of the prediction set definition information to beapplied to the target frame to be encoded employs any of the followingmethods (1) through (3).

-   (1) Prediction methods having the highest appearance frequency in    prediction modes used for encoding frames that have been already    encoded before the target frame, are taken as the prediction values.-   (2) Prediction methods of prediction modes in each prediction set    applied to a frame that has been encoded just before the target    frame are taken as the prediction values.-   (3) Prediction methods assigned to respective prediction modes in a    plurality of predetermined prediction sets are taken as the    prediction values.

If there is no prediction set definition information that has beenalready encoded, initial values of prediction valuesprobable_pred_method[set_idx] [mode_idx] of prediction mode numbersmode_idx are set to prediction values of prediction methods shown inTable 15. In this case, probable_pred_method[set_idx] [mode_idx] equalsto init_pred_method[mode_idx].

TABLE 15 init_pred_method (K = 9) Prediction Method Prediction Mode 0 0[deg] 1 −90 [deg] 2 DC Prediction 3 45 [deg] 4 −45 [deg] 5 67.5 [deg] 6−67.5 [deg] 7 22.5 [deg] 8 −22.5 [deg]

(Prediction Set Definition Information Storing Section 533)

The prediction set definition information storing section 533 receivesprediction set definition information and stores it therein.

(Details of Process of Predicting Prediction Set Definition Information)

The following describes a process of predicting prediction setdefinition information, more specifically, with reference to FIG. 25.FIG. 25 is a flowchart specifically showing how to predict predictionset definition information.

The prediction set definition information predicting section 532determines a prediction value of a prediction set based on predictionset definition information that has been already encoded and stored inthe prediction set definition information storing section 533, andoutputs the prediction value (Step S110).

The prediction set definition information storing section 533 and therelative prediction set definition information generation section 531receive prediction set definition information (Step S111). Theprediction set definition information storing section 533 stores theprediction set definition information (Step S112). The relativeprediction set definition information generation section 531 initializesa counter set_idx indicative of a prediction set number (set_idx=0)(Step S113), and initializes a counter mode_idx indicative of aprediction mode number (mode_idx=0) (Step S114). The relative predictionset definition information generation section 531 then compares aprediction method pred_method[set_idx][mode_idx] indicated by aprediction mode mode_idx in a prediction set set_idx to be applied tothe target frame, with a prediction valueprobable_pred_method[set_idx][mode_idx] of a prediction methodcorresponding to the prediction mode mode_idx in the prediction setpred_set (Step S115). The prediction value is determined by any one ofthe aforementioned methods (1) through (3) (Step S115).

If the prediction method in the prediction mode mode_idx is identicalwith the prediction value (Yes in Step S115), the relative predictionset definition information generation section 531 sets “1” indicative of“identical” as probable_pred_method_flag[set_idx][mode_idx] (Step S116).If the prediction method in the prediction mode mode_idx is differentfrom the prediction value (No in Step S115), the relative prediction setdefinition information generation section 531 sets “0” indicative of“not identical” as the probable_pred_method_flag[set_idx] [mode_idx],and also sets information indicative of which one of remainingprediction methods corresponds to the prediction method, asrem_pred_method[set_idx][mode_idx] (Step S117). The value of therem_pred_method[set_idx][mode_idx] is set based on the followings (1)and (2). (1) If the pred_method[set_idx][mode_idx] is smaller than theprobable_pred_method[set_idx][mode_idx], therem_pred_method[set_idx][mode_idx] is set such thatrem_pred_method[set_idx] [mode_idx]=pred_method[set_idx][mode_idx]. (2)If the pred_method[set_idx][mode_idx] is not smaller than theprobable_pred_method[set_idx] [mode_idx], therem_pred_method[set_idx][mode_idx] is set such thatrem_pred_method[set_idx] [mode_idx]=pred_method[set_idx] [mode_idx]−1.

Subsequently, the relative prediction set definition informationgeneration section 531 increments the counter mode_idx by 1 (Step S118),and compares the counter mode_idx with the number total_mode ofprediction modes (Step S119).

If the counter mode_idx is smaller than the number total_mode ofprediction modes (Yes in Step S119), the relative prediction setdefinition information generation section 531 repeats the processes fromStep S115. If the counter mode_idx is not smaller than the numbertotal_mode of prediction modes (No in Step S119), the relativeprediction set definition information generation section 531 incrementsthe counter set_idx by 1 (Step S120), and compares the counter set_idxwith the number total_set of prediction sets (Step S121). If the counterset_idx is smaller than the number total_set of prediction sets (Yes inStep S121), the relative prediction set definition informationgeneration section 531 repeats the processes from Step S114. If thecounter set_idx is not smaller than the number total_set of predictionsets (No in Step S121), the relative prediction set definitioninformation generation section 531 outputs encoded data of relativeprediction set definition information relative_prediction_method_data( )(Step S122).

In the present embodiment, an encoding unit of the prediction setdefinition information is a frame unit, but is not limited to this. Forexample, the encoding unit of the prediction set definition informationmay be a macro block, a slice, a picture (frame), or a GOP (Group OfPicture). If the prediction set definition information is formed perslice unit, for example, it is necessary to encode newly updatedprediction set definition information at a headmost part of the sliceand to update a table (Table 11) of prediction sets and predictionmodes. Further, when the encoding unit is set smaller, it is possible toform a prediction set suitable to a characteristic of a local image,thereby improving efficiency in prediction. The encoding unit of theprediction set may be determined, in advance, between an image encodingdevice and an image decoding device, or may be designated in a headmostpiece of encoded data, or a headmost part of a picture or a GOP.Alternatively, it is also possible to notify the encoding unit by use ofexternal means.

In Embodiment 3, a prediction set is selected per block unit. However,the prediction set may be selected per macro block unit, perpredetermined number of blocks, or the like, and not particularlylimited to per block unit. By setting a unit for selecting a predictionset to be variable, it is possible to select a prediction set moresuitable to a characteristic of an image.

As described above, when the encoding unit of the prediction setdefinition information and the unit for selecting a prediction set areset smaller, it is possible to carry out prediction more suitable to alocal characteristic of an image. However, to set the encoding unit andthe unit for selection smaller causes an increase in an encoding amountfor encoding these units. Therefore, it is not necessarily optimal toset these units smaller, from the viewpoint of efficiency in encoding.

On this account, by expressing the prediction methods in a hierarchicalmanner with the prediction set definition information, the predictionset information, and the prediction mode information, it is possible toselect a prediction method more flexibly than the conventionaltechnique, and to improve efficiency in prediction while preventing anincrease in the encoding amount.

(Effects)

As described above, the image encoding device 200 calculates edgeinformation of each constituent frame of an image. For example, as theedge information, an edge orientation and an edge strength of the image,or distribution information thereof are/is calculated. The imageencoding device 200 determines a plurality of prediction directions thatare efficiently approximate to edge orientations, on the basis of thedistribution information on the edge orientations, and determines acombination of prediction modes constituting each prediction set.

For example, in the case where the distribution information on the edgeorientations indicates that edges are formed in a horizontal directionin a collective manner, a plurality of prediction sets each having anoptimal combination of prediction modes in which predictions in thehorizontal direction are more finely set and predictions in a verticaldirection are roughly set are automatically determined. Accordingly, theimage is encoded by selecting a prediction set suitable to an edgeorientation in a target block to be encoded, from the plurality ofprediction sets that are optimal for the predictions in the horizontaldirection. On the other hand, in the case where the distributioninformation on the edge orientations indicates that edges are formed ina vertical direction in a collective manner, a plurality of predictionsets each having an optimal combination of prediction modes in whichpredictions in the vertical direction are more finely set andpredictions in the horizontal direction are roughly set areautomatically determined. Accordingly, the image is encoded by selectinga prediction set suitable to an edge orientation in a target block to beencoded, from the plurality of prediction sets that are optimal for thepredictions in the vertical direction.

As such, the image encoding device 200 forms a plurality of predictionsets optimal for an image, by automatically combining prediction modesin each of the plurality of prediction sets, and selects a predictionset suitable to an edge orientation of a target block to be encoded,from the plurality of prediction sets. This arrangement allows improvingefficiency in prediction more than a case where predetermined predictionsets are used.

[Embodiment 4]

Another embodiment of the image decoding device according to the presentinvention is explained below as Embodiment 4, with reference to FIG. 26through FIG. 29. The same constituent components as in Embodiments 1through 3 have the same reference signs as in Embodiments 1 through 3,and are not explained here.

Embodiment 2 dealt with an image decoding device that selects aprediction set to be applied to a target block to be decoded, which is apredetermined pixel block unit, from a plurality of predeterminedprediction sets, thereby allowing predictions from more various anglesthan the conventional technique. The present embodiment deals with animage decoding device in which a plurality of prediction sets in each ofwhich prediction modes are automatically combined are formed inconformity with encoded data and a prediction set to be applied to atarget block to be decoded is selected from the plurality of predictionsets, so that predictions can be carried out from further more variousangles.

(Arrangement of Image Decoding Device 250)

An arrangement of an image decoding device 250 according to Embodiment 4is explained below with reference to FIG. 26. FIG. 26 is a block diagramshowing the arrangement of the image decoding device 250.

As illustrated in FIG. 26, the image decoding device 250 mainly includesan entropy decoding section 205, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 210, a prediction setinformation forming section 52, and a prediction set definitioninformation forming section 54. The present embodiment only describesthe entropy decoding section 205 and the prediction set definitioninformation forming section 54, which have not been described above.

(Entropy Decoding Section 205)

The entropy decoding section 205 has the same function as the entropydecoding section 5 in Embodiment 2, and further has a function ofcarrying out entropy decoding with respect to encoded data of relativeprediction set definition information and outputting the relativeprediction set definition information.

(Prediction Set Definition Information Forming Section 54)

The prediction set definition information forming section 54 formsprediction set definition information from the relative prediction setdefinition information thus entropy-decoded and prediction setdefinition information that has been already decoded. An arrangement andan operation of the prediction set definition information formingsection 54 will be described later.

(Overview of Image Decoding Process)

The following generally describes an image decoding process in the imagedecoding device 250, with reference to FIG. 27. FIG. 27 is a flowchartschematically showing the image decoding process in the image decodingdevice 250.

(Reception of Encoded Data and Formation of Prediction Set definitionInformation)

When the image decoding device 250 receives encoded data of a targetframe to be decoded (Step S130), the entropy decoding section 205 takesout, from the received encoded data, relative information (relativeprediction set definition information) of prediction set definitioninformation indicative of a table (Table 11) of prediction sets andprediction modes, which are to be applied to the target frame to bedecoded, and carries out entropy decoding with respect to the relativeprediction set definition information thus taken out (Step S131). Theprediction set definition information forming section 54 formsprediction set definition information on the basis of theentropy-decoded relative prediction set definition information andprediction set definition information that has been already decoded, andupdates the table (Table 11) of the prediction sets and the predictionmodes to be applied to the target frame to be decoded. Then, theprediction set definition information forming section 54 supplies theprediction set definition information thus formed to the intraprediction section 210 (Step S132).

How the prediction set definition information forming section 54 carriesout a process of forming the prediction set definition information willbe described later more specifically.

(Formation of Prediction Set Information)

The entropy decoding section 205 carries out entropy decoding withrespect to relative prediction set information on a prediction set to beapplied to a target image to be decoded (an M×M pixel block, hereinafterreferred to as a target block to be decoded) in the received targetframe to be decoded (Step S133). The prediction set information formingsection 52 forms prediction set information of the target block to bedecoded, from the relative prediction set information thusentropy-decoded and prediction set information that has been alreadydecoded (Step S134). How to form prediction set information in theprediction set information forming section 52 is the same as inEmbodiment 1.

(Decoding of Prediction Residual data and Prediction Mode Information)

The entropy decoding section 205 carries out entropy decoding withrespect to a quantization value of prediction residual data andprediction mode information of a target sub block to be decoded (StepS135). The target sub block is obtained by subdividing the target blockby a predetermined block size (N×N pixel block).

(Generation of Predicted Image)

The intra prediction section 210 carries out intra prediction by use ofprediction set definition information and a locally decoded image,stored in the memory 9, of adjacent sub blocks that have been alreadydecoded, so as to generate a predicted image (N×N pixel block) inaccordance with a prediction mode to be applied to the target sub block(Step S136). The prediction mode is indicated by the prediction setinformation and the prediction mode information.

(Inverse Quantization and Inverse Orthogonal Transformation)

The inverse quantization section 6 carries out inverse quantization withrespect to the prediction residual data decoded in Step S135, andsupplies the prediction residual data to the inverse orthogonaltransformation section 7 (Step S137). The inverse orthogonaltransformation section 7 carries out inverse orthogonal transformationwith respect to the prediction residual data thus inverse-quantized, andsupplies the prediction residual data to the addition computing section8 (Step S138).

(Generation of Decoded Image of Target Sub Block)

The addition computing section 8 adds the predicted image thus generatedin Step S136 to the prediction residual data thus supplied in Step S138,and outputs a decoded image (N×N pixel block) of the target sub block(Step S139).

The memory 9 receives and stores the decoded image of the target subblock therein (Step S140).

(Additional Matters)

The image decoding device 250 repeats the processes from Step S135 toStep S140 with respect to all sub blocks (N×N pixel blocks) constitutingthe target block (M×M pixel block) to be decoded. Further, the imagedecoding device 250 repeats the processes from Step S133 to Step S140with respect to all target blocks to be decoded constituting the targetframe to be decoded, and also repeats the processes from Step S130 toStep S140 with respect to all frames constituting a target image to bedecoded. The processes from S135 to S140 are carried out per sub blockunit of an N×N pixel block, but may be carried out per block unit of anM×M pixel block.

(Process of Forming Prediction Set Definition Information)

The following describes how to form the prediction set definitioninformation, more specifically. The prediction set definitioninformation forming section 54 forms the prediction set definitioninformation from entropy-decoded relative prediction set definitioninformation and prediction set definition information that has beenalready decoded.

(Arrangement of Prediction Set Definition Information Forming Section54)

Initially explained is an arrangement of the prediction set definitioninformation forming section 54 with reference to FIG. 28. FIG. 28 is ablock diagram showing the arrangement of the prediction set definitionforming section 54. The prediction set definition information formingsection 54 includes a prediction set definition information generationsection 541, a prediction set definition information predicting section532, and a prediction set definition information storing section 533.The following describes the prediction set definition informationgeneration section 541, which has not been described yet.

(Prediction Set Definition Information Generation Section 541)

The prediction set definition information generation section 541generates prediction set definition information on the basis of (a)relative prediction set definition information entropy-decoded by theentropy decoding section 205 and (b) prediction values determined by theprediction set definition information predicting section 532 based onprediction set definition information that has been already decoded. Theprediction set definition information generation section 541 thenoutputs the prediction set definition information.

(Process of Generating Prediction Set Definition Information)

The following describes a process of generating prediction setdefinition information, more specifically, with reference to FIG. 29.FIG. 29 is a flowchart specifically showing the process of generatingprediction set definition information.

The prediction set definition information predicting section 532determines prediction values in regard to prediction methods to beassigned to prediction modes in a plurality of prediction sets to beapplied to the target frame to be decoded, on the basis of predictionset definition information that has been decoded and stored in theprediction set definition information storing section 533, and thenoutputs the prediction values thus determined (Step S150). Theprediction values in regard to the prediction methods to be assigned tothe prediction modes in the plurality of prediction sets to be appliedto the target frame to be decoded are determined in the same manner asthe method of determining prediction values of prediction setdefinitions in the image encoding device 200 in Embodiment 3. Therefore,how to determine the prediction values is not explained here. Theprediction set definition information forming section 54 receivesrelative prediction set definition information. The relative predictionset definition information thus received is supplied to the predictionset definition information generation section 541 (Step S151).

The prediction set definition information generation section 541initializes a counter set_idx indicative of a prediction set number(set_idx=0) (Step S152), and also initializes a counter mode_idxindicative of a prediction mode number (mode_idx=0) (Step S153). Then,the prediction set definition information generation section 541examines a value of probable_pred_method_flag[set_idx] [mode_idx]indicative of whether or not a prediction mode mode_idx in theprediction set set_idx is identical with the prediction value (StepS154).

If the value of the probable_pred_method_flag[set_idx][mode_idx] is “1”(Yes in Step S154), the prediction set definition information generationsection 541 sets the prediction value probable_pred_method[set_idx][mode_idx] as the pred_method[set_idx][mode_idx] (Step S155). In thiscase, the prediction method is set such that pred_method[set_idx][mode_idx]=probable_pred_method[set_idx][mode_idx].

If the value of the probable_pred_method_flag[set_idx][mode_idx] is “0”(No in Step S154), the prediction set definition information generationsection 541 sets the pred_method[set_idx][mode_idx] based onrem_pred_method[set_idx][mode_idx] and the prediction valueprobable_pred_method[set_idx][mode_idx] (Step S156). More specifically,the value of the pred_method[set_idx][mode_idx] is set in accordancewith the followings (1) and (2): (1) if therem_pred_method[set_idx][mode_idx] is smaller than theprobable_pred_method[set_idx] [mode_idx], thepred_method[set_idx][mode_idx] is set such thatpred_method[set_idx][mode_idx]=rem_pred_method[set_idx][mode_idx]; and(2) if the rem_pred_method[set_idx][mode_idx] is not smaller than theprobable_pred_method[set_idx] [mode_idx], thepred_method[set_idx][mode_idx] is set such thatpred_method[set_idx][mode_idx]=rem_pred_method[set_idx][mode_idx]+1.

Subsequently, the prediction set definition information generationsection 541 increments the counter mode_idx by 1 (Step S157), andcompares the counter mode_idx with the number total_mode of predictionmodes (Step S158).

If the counter mode_idx is smaller than the number total_mode ofprediction modes (Yes in Step S158), the prediction set definitioninformation generation section 541 repeats the processes from Step S154.If the counter mode_idx is not smaller than the number total_mode ofprediction modes (No in Step S158), the prediction set definitioninformation generation section 541 increments the counter set_idx by 1(Step S159), and compares the counter set_idx with the number total_setof prediction sets (Step S160).

If the counter set_idx is smaller than the number total_set ofprediction sets (Yes in Step S160), the prediction set definitioninformation generation section 541 repeats the processes from Step S153.If the counter set_idx is not smaller than the number total_set ofprediction sets (No in Step S160), prediction set definition informationprediction_method_data( ) is stored in the prediction set definitioninformation storing section 533, and then is outputted (Step S161).

In the present embodiment, a decoding unit of the prediction setdefinition information is a frame unit. However, the decoding unit isnot limited to this. For example, a macro block, a slice, a picture(frame), or a GOP (Group Of Picture) may be also used as the decodingunit of the prediction set definition information. If the prediction setdefinition information is formed per slice unit, for example, it isnecessary to decode encoded data related to the prediction setdefinition information at a headmost part of the slice. The decodingunit may be determined, in advance, between an image encoding device andan image decoding device, or may be designated in a headmost piece ofencoded data, a picture, or a GOP header. Alternatively, it is alsopossible to notify the decoding unit by use of external means.

In Embodiment 4, a prediction set is selected per block unit. However,the prediction set may be selected per macro block unit, perpredetermined block unit, or the like, and not particularly limited toper block unit. By setting a unit for selecting a prediction set to bevariable, it is possible to select a prediction set more suitable to acharacteristic of an image.

Further, in the present embodiment, encoded data of relative predictionset definition information is entropy-decoded. However, instead of therelative prediction set definition information, encoded data ofprediction set definition information may be entropy-decoded, so thatprediction methods to be assigned to respective prediction modes in aplurality of prediction sets to be applied to a target frame to bedecoded may be determined on the basis of the prediction set definitioninformation thus decoded.

Furthermore, in the image decoding device 250, the prediction methodsare expressed in a hierarchical manner with the prediction setdefinition information, the prediction set information, and theprediction mode information. As a result, it is possible to select aprediction method more flexibly than the conventional technique. Thisimproves efficiency in prediction.

(Effects)

As described above, the image decoding device 250 forms prediction setdefinition information indicative of prediction methods to be assignedto respective prediction modes in a plurality of prediction sets to beapplied to a target frame to be decoded, constituting encoded data of animage, on the basis of relative prediction set definition information ofthe target frame and prediction set definition information that has beenalready decoded. Further, the image decoding device 250 decodes aprediction set to be applied to each block (M×M pixel block)constituting the target frame to be decoded. Furthermore, the imagedecoding device 250 carries out intra prediction with respect to eachsub block (N×N pixel block) constituting the block, so as to generate apredicted image of the sub block. Thus generated predicted image iscombined with decoded prediction residual data of the sub block, therebyreconstructing an image of the sub block.

In the arrangement, in the case where the prediction set definitioninformation indicates a prediction set definition that focuses onpredictions in a horizontal direction, it is possible to generate apredicted image from more specified angles with the horizontal directionas a center. Further, in the case where the prediction set definitioninformation indicates a prediction set that focuses on predictions in avertical direction, it is possible to generate a predicted image frommore specified angles with the vertical direction as a center. Thearrangement allows the image decoding device 250 to define predictionmodes in each of a plurality of prediction sets in conformity to animage, and to carry out prediction optimal for an edge orientation of atarget block to be decoded, by use of a corresponding one of theprediction modes thus defined. As a result, it is possible to furtherimprove efficiency in prediction as compared to a case wherepredetermined prediction sets are used.

Moreover, the prediction methods are expressed in a hierarchical mannerby use of the prediction sets and the prediction modes, thereby makingit possible to further improve the efficiency in prediction withoutincreasing an encoding amount.

[Embodiment 5]

Another embodiment of the image encoding device according to the presentinvention is explained below as Embodiment 5 with reference to FIG. 30through FIG. 37. The same constituent components as in Embodiments 1through 4 have the same reference signs as in Embodiments 1 through 4,and are not explained here. Embodiment 1 dealt with an image encodingdevice in which a prediction set to be applied to a target block to beencoded is selected per pixel block unit from a plurality ofpredetermined prediction sets, so that the image encoding device cancarry out more various predictions than the conventional technique. Onthe other hand, Embodiment 5 deals with an image encoding device whichhas the same function as the image encoding device of Embodiment 1 andfurther which estimates a prediction mode to be applied to each subblock (target sub block) in a target block to be encoded, on the basisof (i) a selected prediction set, (ii) a flag indicative of a directionof an adjacent sub block which has been already encoded and which isused for estimating a prediction mode of the target sub block, and (iii)a position of the target sub block. The arrangement allows the imageencoding device according to Embodiment 5 to efficiently reduce anencoding amount necessary for a prediction mode and further to improveefficiency in encoding.

(Arrangement of Image Encoding Device 500)

An arrangement of an image encoding device 500 according to the presentembodiment is explained below with reference to FIG. 30. FIG. 30 is ablock diagram showing the arrangement of the image encoding device 500according to the present embodiment. The image encoding device 500includes a difference computing section 1, an orthogonal transformationsection 2, a quantization section 3, an entropy encoding section 504, aninverse quantization section 6, an inverse orthogonal transformationsection 7, an addition computing section 8, a memory 9, an intraprediction section 10, an encode parameter determining section 14, arelative prediction set information forming section 51, and a relativeprediction mode information forming section 61. The following describesthe entropy encoding section 504, the relative prediction modeinformation forming section 61, and the encode parameter determiningsection 14.

(Encode Parameter Determining Section 14)

The encode parameter determining section 14 determines encode parameters(for example: (a) a prediction set to be applied to a target block to beencoded; (b) information (a reference direction combination index) on acombination of reference sub blocks to be used for estimation of aprediction mode of each sub block in a target block to be encoded; and(c) a prediction mode to be applied to each sub block) based on aninputted original image of the target block to be encoded and a locallydecoded image stored in the memory 9. The encode parameter determiningsection 14 supplies a determined prediction set to the intra predictionsection 10, the relative prediction set information forming section 51,and the relative prediction mode information forming section 61.

Further, the encode parameter determining section 14 supplies adetermined reference direction combination index to the relativeprediction mode information forming section 61 and the entropy encodingsection 504. Furthermore, the encode parameter determining section 14supplies a determined prediction mode of each sub block to the intraprediction section 10 and the relative prediction mode informationforming section 61.

(Entropy Encoding Section 504)

The entropy encoding section 504 carries out entropy encoding withrespect to prediction residual data, relative prediction modeinformation, relative prediction set information, and the referencedirection combination index, and outputs encoded data thereof.

In the entropy encoding section 504, the reference direction combinationindex is entropy-encoded into a variable-length code by use of areference direction combination index code table described below, inconsideration of a bias of appearance frequency of reference directioncombinations.

More specifically, if possible values that the reference directioncombination index may take are in a range of values from 0 to 4 in areference direction combination table 1 shown in Table 20, a referencedirection combination index code table shown in Table 16 is used.Further, if possible values that the reference direction combinationindex may take are in a range of values from 0 to 1 in a referencedirection combination table 2 shown in Table 21, a reference directioncombination index code table shown in Table 17 is used. However, thecodes for the reference direction combination index are not limited tothose in Table 16 and Table 17. For example, the codes for the referencedirection combination index may be Golomb codes or fixed-length codes.Further, if arithmetic codes may be used as the codes, the referencedirection combination index code table may be used as a conversion tablefor converting an index into a binary value.

TABLE 16 Reference Direction Combination Index Code 0 1 1 000 2 001 3010 4 011

TABLE 17 Reference Direction Combination Index Code 0 1 1 0

(Relative Prediction Mode Information Forming Section 61)

The relative prediction mode information forming section 61 formsrelative prediction mode information of a target sub block based on (i)the prediction set information, the prediction mode information, and thereference direction combination index, each received from the encodeparameter determining section 14, and (ii) prediction set informationand prediction mode information, stored inside the relative predictionmode information forming section 61, of a sub block which is adjacent tothe target sub block and which has been already encoded. The relativeprediction mode information forming section 61 then outputs the relativeprediction mode information of the target sub block.

An arrangement of the relative prediction mode information formingsection 61 is explained below with reference to FIG. 31. FIG. 31 is ablock diagram showing the arrangement of the relative prediction modeinformation forming section 61.

As shown in FIG. 31, the relative prediction mode information formingsection 61 includes a storing section 611 a, a storing section 611 b, areference direction determining section 612, a prediction modeinformation estimating section 613, and a relative prediction modeinformation generation section 614. Each of the constituent members isdescribed below.

(Storing Sections 611 a, 611 b)

The storing sections 611 a and 611 b temporarily stores inputinformation therein. The storing section 611 a receives and then storesprediction mode information of the target sub block therein. The storingsection 611 b stores prediction set information of the target sub blocktherein. The prediction mode information and the prediction setinformation thus stored are used for estimating prediction modeinformation of a subsequent sub block that will be encoded after thetarget sub block is encoded.

(Reference Direction Determining Section 612)

The reference direction determining section 612 determines, according tothe reference direction combination table shown in Table 20, a direction(reference direction) of an encoded adjacent sub block (reference subblock) which is referred to at a time of estimating prediction modeinformation of the target sub block. The reference direction isdetermined based on the prediction set information thus received, areference direction combination index, and a position (internallycounted) of the target sub block. The reference direction determiningsection 612 supplies the reference direction thus determined to theprediction mode information estimating section 613.

(Prediction Mode Information Estimating Section 613)

The prediction mode information estimating section 613 determines anestimation value of prediction mode information, which is to be used forthe target sub block, by a predetermined method on the basis of (i) theprediction set information thus received, (ii) the reference directiondetermined by the reference direction determining section 612, (iii)prediction mode information of an encoded adjacent sub block, stored inthe storing section 611 a, and (iv) prediction set information of theencoded adjacent sub block, stored in the storing section 611 b. Theprediction mode information estimating section 613 then supplies theestimation value thus determined to the relative prediction modeinformation generation section 614.

(Relative Prediction Mode Information Generation Section 614)

The relative prediction mode information generation section 614generates relative information (relative prediction mode information) ofthe prediction mode of the target sub block with respect to theestimation value, based on the prediction mode information thus receivedand the estimation value probable_mode of prediction mode information,which estimation value is determined by the prediction mode informationestimating section 613. The relative prediction mode informationgeneration section 614 then supplies the relative prediction modeinformation thus generated to the entropy encoding section 504.

A data structure of the relative prediction mode informationrelative_mode_data( ) is shown in Table 18. In Table 18,probable_mode_flag in the relative_mode_data( ) is a flag indicatingwhether or not the prediction mode to be applied to the target sub blockis identical with the estimation value determined by the prediction modeinformation estimating section 613. If a value of the probable_mode_flagis “1”, the prediction mode to be applied to the target sub block isidentical with the estimation value. If the value of theprobable_mode_flag is “0”, the prediction mode to be applied to thetarget sub block is different from the estimation value. In the casewhere the value of the probable_mode_flag is “0”, the relativeprediction mode information further includes information rem_modeindicative of which one of prediction modes in the prediction set of thetarget sub block, except for a prediction mode indicated by theestimation value, corresponds to the prediction mode to be applied tothe target sub block. The relative prediction mode information may be adifference between the estimation value and the value of the predictionmode to be applied to the target sub block.

TABLE 18 Parameter Detail relative_mode_data( ){ Relative PredictionMode Information  probable_mode_flag Flag Indicative of Whether or notDetermined Prediction Mode is Identical with Estimation Value ofPrediction Mode  if(probable_mode_flag!=1){ If Determined PredictionMode is Different from Estimation Value of Prediction Mode, AddFollowing Information   rem_mode Indicative of Which One of PredictionModes Except for Estimation Value of Prediction Mode Corresponds toDetermined Prediction Mode }

(Overview of Image Encoding Process)

The following generally describes an image encoding process in the imageencoding device 500, with reference to FIG. 32. FIG. 32 is a flowchartschematically showing the image encoding process in the image encodingdevice 500.

Initially, the image encoding device 500 receives a target block to beencoded (M×M pixel block) (Step S170).

The encode parameter determining section 14 determines encode parameters(a prediction set, a reference direction combination index, andprediction modes of all sub blocks) by use of the rate distortionoptimization method, on the basis of an original image of the targetblock to be encoded and a locally decoded image stored in the memory 9(Step S171). The determined prediction set is supplied to the intraprediction section 10, the relative prediction set information formingsection 51, and the relative prediction mode information forming section61. The determined reference direction combination index is supplied tothe relative prediction mode information forming section 61 and theentropy encoding section 504. The determined pieces of prediction modeinformation of all the sub blocks are supplied to the intra predictionsection 10 and the relative prediction mode information forming section61.

Then, the relative prediction set information forming section 51 formsrelative prediction set information based on a prediction set that hasbeen already encoded and the prediction set information determined inStep S171, and supplies the relative prediction set information to theentropy encoding section 504 (Step S172).

The entropy encoding section 504 carries out entropy encoding withrespect to the relative prediction set information formed in Step S172and the reference direction combination index determined in Step S171,and outputs encoded data thereof. (Step S173).

The relative prediction mode information forming section 61 formsrelative prediction mode information for a target sub block to beencoded, based on (i) the prediction set information, the referencedirection combination index, and prediction mode information for thetarget sub block to be encoded, each received from the encode parameterdetermining section 14, and (ii) prediction set information andprediction mode information of a reference sub block. The relativeprediction mode information forming section 61 then outputs the relativeprediction mode information (Step S174).

The entropy encoding section 504 carries out entropy encoding withrespect to the relative prediction mode information thus formed, andoutputs encoded data thereof (Step S175).

The intra prediction section 10 carries out intra prediction defined bythe prediction set and the prediction mode each determined in Step S171,by use of a locally decoded image, received from the memory 9, ofadjacent sub blocks that have been already encoded, and generates apredicted image of the target sub block to be encoded (Step S176). Thegenerated predicted image of the target sub block to be encoded issupplied to the difference computing section 1 and the additioncomputing section 8.

The difference computing section 1 calculates prediction residual dataof the target sub block to be encoded, which is a difference between theoriginal image of the target sub block to be encoded and the predictedimage generated in Step S176, and outputs the prediction residual data(Step S177).

The prediction residual data thus calculated in Step S177 is supplied tothe orthogonal transformation section 2 and then to the quantizationsection 3 so as to be subjected to orthogonal transformation andquantization, respectively. The prediction residual data is thensupplied to the entropy encoding section 504 and the inversequantization section 6 (Step S178).

The prediction residual data thus subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization section 6 and then to the inverse orthogonal transformationsection 7 so as to be subjected to inverse quantization and inverseorthogonal transformation, respectively. The prediction residual data isthen supplied to the addition computing section 8 (Step S179).

The addition computing section 8 adds the prediction residual data thussubjected to the inverse quantization and the inverse orthogonaltransformation in Step S179, to the predicted image generated in StepS176, so as to generate a locally decoded image of the target sub blockto be encoded (Step S180). The locally decoded image thus generated isthen stored in the memory 9.

The entropy encoding section 504 carries out entropy encoding withrespect to the quantized prediction residual data of the target subblock, and outputs encoded data of the prediction residual data (StepS181).

The processes from Step S174 to Step S181 are carried out with respectto all sub blocks constituting the target block to be encoded. Further,the processes from Step S170 to Step S181 are carried out with respectto all blocks constituting a target image to be encoded.

In the present embodiment, the encoding process in the image encodingdevice 500 is explained sequentially in the order from Step S170 to StepS181. However, the order of the encoding process is not limited to this,and can be altered within a range in which the present invention can becarried out.

(How to Determine Reference Direction)

Next will be explained how to determine the reference direction.Initially, the following explains about a sub-block group, the referencedirection, the reference direction combination index, and the referencedirection combination table.

The sub-block group is explained below with reference to (a) and (b) ofFIG. 33. (a) and (b) of FIG. 33 are views illustrating a sub-blockgroup(s). (a) of FIG. 33 illustrates sub-block groups if a size M of atarget block and a size N of a sub block are such that N=M/4. (b) ofFIG. 33 illustrates a sub-block group if a size M of a target block anda size N of a sub block are such that N=M/2.

A sub-block group B1 in (a) of FIG. 33 is a group including 4 sub blocksa, b, c, and d. Similarly, a sub-block group B2 is a group including 4sub blocks e, f, g, and h, a sub-block group B3 is a group including 4sub blocks i, j, k, and l, and a sub-block group B4 is a group including4 sub blocks m, n, o, and p. A sub-block group B1 in (b) of FIG. 33 is agroup including sub blocks a through d. A combination of sub blocksincluded in a sub-block group is not limited to these.

The “reference direction” is a common relative position (reference subblock position) of an encoded sub block that is referred to at a time ofestimating a prediction mode of a sub block included in a sub-blockgroup. For example, a reference direction “0” indicates that thereference sub block is an encoded sub block that is positioned on theleft side of a target sub block. Further, a reference direction “1”indicates that the reference sub block is an encoded sub block that ispositioned on the upper side of the target sub block. A value indicatedby the reference direction is not limited to a binary value. As shown inTable 19, for example, a reference direction “2” may indicate an encodedadjacent sub block that is positioned on the upper left of the targetsub block, and a reference direction “3” may indicate an encodedadjacent sub block that is positioned on the upper right of the targetsub block. Correlations between the values of the reference directionsand the positions of the reference sub blocks are not limited to thoseshown in Table 19.

TABLE 19 Position of Reference Reference Direction Sub block 0 Left 1Upper Side 2 Upper Left 3 Upper Right

The “reference direction combination index” is an index assigned to acombination of reference directions of the sub-block groups B1 throughB4.

The “reference direction combination table” is a table in which acorrespondence relation between a reference direction combination indexand reference directions of respective reference sub-block groups ispredetermined. The reference direction combination table used fordetermining a reference direction is changed depending on the size ofthe target sub block. The following describes more details.

(1) At a Time when the Size of the Sub Block is N=M/4

Table 20 shows an example of the reference direction combination tableused at a time when the size of the sub block is N=M/4. A prediction setflag in Table 20 is such that: for a prediction set flag “0”, predictionset information indicates a prediction set that focuses on predictionsin a horizontal direction; and for a prediction set flag “1”, theprediction set information indicates a prediction set that focuses onpredictions in a vertical direction. Further, FIG. 34 illustratesdirections of reference sub blocks in the case where the prediction setflag is “0” and the reference direction combination index is “2” inTable 20. In FIG. 34, reference directions in the sub-block groups B1,B2, and B4 are “0”, and therefore each sub block in each of thesub-block groups refers to an encoded sub block on the left thereof asthe reference sub block (the right arrow in FIG. 34). On the other hand,a reference direction in the sub-block group B3 is “1”, and thereforeeach sub block in the sub-block group B3 refers to an encoded sub blockon the upper side thereof as a reference sub block (the down arrow inFIG. 34). A correspondence relation between the reference directioncombination index and the reference directions in the respectivesub-block groups is changed depending on which direction the predictionset flag puts much weight in, the horizontal direction or the verticaldirection.

TABLE 20 Reference Direction Reference Direction Prediction Set FlagCombination Index B1 B2 B3 B4 0 0 0 0 0 0 (Mainly Horizontal Direction)1 0 0 0 1 2 0 0 1 0 3 0 1 0 0 4 1 0 0 0 1 0 1 1 1 1 (Mainly VerticalDirection) 1 1 1 1 0 2 1 1 0 1 3 1 0 1 1 4 0 1 1 1

(2) At a Time when the Size of the Sub Block is N=M/2

In the case where the size of the sub block is N=M/2, a referencedirection combination table shown in Table 21 is used regardless ofprediction set information.

TABLE 21 Reference Direction Combination Index B1 0 0 1 1

As described above, in the case where the size of the target sub blockis N=M/4, the reference direction determining section 612 obtains areference direction of a sub-block group Bi from Table 20, based on thereceived prediction set information, the received reference directioncombination index, and the position of the target sub block (indicativeof which sub-block group Bi the target sub block belongs to), and thenoutputs the reference direction thus obtained.

Further, in the case where the size of the target sub block is N=M/2,the reference direction determining section 612 obtains a referencedirection of the sub-block group B1 based on the received referencedirection combination index, and outputs the reference direction thusobtained.

(How to Determine Estimation Value for Prediction Mode Information)

Subsequently, the following explains about how the prediction modeinformation estimating section 613 determines an estimation value ofprediction mode information. In the present embodiment, a positionalrelation, indicated by the reference direction, between a target subblock P to be encoded and a reference sub block Q is either case shownin (a) or (b) of FIG. 35, for example. (a) of FIG. 35 illustrates apositional relation between the target sub block to be encoded (P in thefigure) and the reference sub block (Q in the figure), where thereference direction is “0”. (b) of FIG. 35 illustrates a positionalrelation between the target sub block P to be encoded and the referencesub block Q, where the reference direction is “1”.

The prediction mode information estimating section 613 obtains, based onthe reference direction, prediction mode information and prediction setinformation of the reference sub block Q, respectively from the storingsection 611 a and the storing section 611 b.

Then, the prediction mode information estimating section 613 estimates aprediction mode in accordance with a prediction set of the target subblock P to be encoded and a prediction set of the reference sub block Q,in accordance with either of the following 2 methods.

(1) If the prediction set of the target sub block P is identical withthe prediction set of the reference sub block Q, a value of theprediction mode of the reference sub block Q is set as an estimationvalue of a prediction mode for the target sub block P. However, if theprediction mode information of the reference sub block Q cannot beobtained, a value of a predetermined prediction mode is set as theestimation value of a prediction mode.

(2) If the prediction set of the target sub block P is different fromthe prediction set of the reference sub block Q, it is found out whichprediction mode in the prediction set of the target sub block Pcorresponds to the prediction mode of the reference sub block Q, byreferring to a prediction mode correspondence table, which will bedescribed later. The prediction mode thus found out is set as theestimation value of a prediction mode for the target sub block P.However, if the prediction mode information or the prediction setinformation of the reference sub block Q cannot be obtained from thestoring section 611 a or 611 b, a predetermined prediction mode is setas the estimation value. Such a case where the prediction modeinformation or the prediction set information of the reference sub blockQ cannot be obtained indicates, for example, a case where the target subblock P is positioned at an end of the target image to be encoded andthere is no reference sub block Q.

Table 22 is an example of a prediction mode correspondence table wherethe prediction set of the reference sub block Q is a prediction set 1 inTable 2 and the prediction set of the target sub block P is a predictionset 0 in Table 2.

TABLE 22 Reference Sub Block Q Target Sub Block P Prediction Set = 1Prediction Set = 2 Prediction Mode 0 0 1 1 2 2 3 8 4 6 5 4 6 1 7 3 8 1

In the prediction mode correspondence table, it is preferable to set, inadvance, (a) values of prediction modes x in a prediction set X appliedto the reference sub block Q, and (b) values of prediction modes y in aprediction set Y to be applied to the target sub block P, in such amanner that a prediction mode y that is identical with a prediction modex (i.e., the same prediction method) or most approximate to theprediction mode x (i.e., an absolute value of a difference between theirprediction directions is smallest) is set as a corresponding value tothe prediction mode x. For a prediction mode 0 in the prediction set 1and a prediction mode 0 in the prediction set 2 in Table 2, for example,prediction directions thereof are −90 [deg]. Therefore, the predictionmode 0 in the prediction set 2 is set in the row of the prediction mode0 in the prediction set 1 in Table 22. Further, for a prediction mode 2in the prediction set 1 and a prediction mode 2 in the prediction set 2in Table 2, prediction directions thereof are a DC prediction.Therefore, the prediction mode 2 in the prediction set 2 is set in therow of the prediction mode 2 in the prediction set 1 in Table 22.Moreover, in a case of a prediction mode 3 (prediction direction:−30[deg]) in the prediction set 1, it is found which prediction mode inthe prediction set 2 is identical or approximate to the prediction mode3 in the prediction set 1. In this case, a prediction mode 8 (predictiondirection: −30[deg]) in the prediction set 2 is most approximate to theprediction mode 3 in the prediction set 1 (an absolute value of adifference between their prediction directions is 0 [deg], which issmallest). Accordingly, the prediction mode 8 in the prediction set 2 isset in the row of the prediction mode 3 in the prediction set 1 in Table22.

If there are at least 2 prediction modes y being identical orapproximate to a target prediction mode x in the prediction set X, amongthe prediction modes y in the prediction set Y, a prediction mode yhaving a smaller value is set. For example, assume a case of finding aprediction mode, in the prediction set 2, identical or approximate to aprediction mode 6 (prediction direction: 15[deg]) in the prediction set1. In this case, there are approximate prediction modes in theprediction set 2, a prediction mode 1 (prediction direction: 0[deg]) anda prediction mode 6 (prediction direction 30[deg]). In this case, it ispreferable that a prediction mode having a smaller value between the 2prediction modes, that is, the prediction mode 1 is set in the row ofthe prediction mode 6 in the prediction set 1 in Table 22.

Here, the following describes how to determine an estimation value of aprediction mode for the target sub block with the use of Table 22, morespecifically. In the following explanation, the prediction set of thereference sub block Q is 1 and the prediction set of the target subblock P is 2. If the prediction mode of the reference sub block Q is“0”, an estimation value of a prediction mode for the target sub block Pis set to “0”, according to Table 22. Further, if the prediction mode ofthe reference sub block Q is “6”, the estimation value of a predictionmode for the target sub block P is set to “1”, according to Table 22.

Even if the prediction set of the target sub block P is different fromthe prediction set of the reference sub block Q, when the aboveprediction mode correspondence table is used, the prediction mode of thereference sub block is converted into a most approximate prediction modein the prediction set of the target sub block P, thereby making itpossible to improve accuracy of the estimation value of a predictionmode for the target sub block P.

(Details of Process of Forming Relative Prediction Mode Information)

Next will be described a process of forming relative prediction modeinformation with reference to FIG. 36. FIG. 36 is a flowchartspecifically showing the process of forming relative prediction modeinformation.

Initially, the storing sections 611 a and 611 b respectively storeprediction set information and prediction mode information therein (StepS190). The reference direction determining section 612 determines areference direction of a reference sub block which reference directionis used at a time of estimating prediction mode information of a targetsub block, according to a reference direction combination table, basedon the prediction set information thus received, a reference directioncombination index, and a position of the target sub block. The referencedirection determining section 612 supplies the determined referencedirection to the prediction mode information estimating section 613(Step S191).

The prediction mode information estimating section 613 obtains: (i) fromthe storing section 611 a, prediction mode information of an encodedadjacent sub block (a reference sub block) that is indicated by thedetermined reference direction thus received; and (ii) from the storingsection 611 b, prediction set information of the encoded adjacent subblock (Step S192). The prediction mode information estimating section613 then determines an estimation value of prediction mode informationfor the target sub block, according to a prediction mode correspondencetable, based on the obtained prediction mode information and predictionset information of the reference sub block, and the prediction setinformation of the target sub block. Subsequently, the prediction modeinformation estimating section 613 supplies the determined estimationvalue to the relative prediction mode information generation section 614(Step S193).

The relative prediction mode information generation section 614generates relative prediction mode information of the target sub blockbased on the prediction mode information of the target sub block and theestimation value of prediction mode information, and outputs therelative prediction mode information (Step S194).

(Details of Determination Process of Encode Parameters)

The following describes how the encode parameter determining section 14determines encode parameters (s, p, M). In advance of the explanation ofhow to determine encode parameters, the following describes terms foruse in determination of the encode parameters.

-   s: Prediction Set-   p: Reference Direction Combination Index-   bk: Sub Block-   m(bk): Prediction Mode in Sub Block bk-   M: Prediction Modes of All Sub Blocks Included in Target Block to be    Encoded    -   M=(m(0),m(1), . . . ,m(bk), . . . )-   W: Target Block to be Encoded-   J(s, p, M): Encoding Cost Based on Rate Distortion Optimization    Method-   Jmin: Minimum Value of Encoding Cost-   sbest: Prediction Set Used for Encoding-   pbest: Reference Direction Combination Index Used for Encoding-   mbest(bk): Prediction Mode Used for Encoding Sub Block bk-   Mbest: Prediction Modes Used For All Sub Blocks Included in Target    Block to be Encoded    -   Mbest=(mbest(0),mbest(1), . . . ,mbest(bk), . . . )-   Rs(s): Encoding Amount Necessary for Encoding Prediction Set s-   Rp(p): Encoding Amount Necessary for Encoding Reference Direction    Combination Index p-   Rm(s, p, m(bk)): Encoding Amount Necessary for Encoding Prediction    Mode m(bk) to be Applied to Sub Block bk Where Prediction Set s and    Reference Direction Combination Index p are Applied-   Rd(s, p, m(bk)): Encoding Amount of Prediction Residual data,    Necessary for Encoding Sub Block bk by use of Prediction Set s,    Reference Direction Combination Index p, and Prediction Mode m(bk)-   Dd(s, p, m(bk)): Signal Distortion Caused When Sub Block bk is    Encoded by use of Prediction Set s, Reference Direction Combination    Index p, and Prediction Mode m(bk)-   λs: Lagrange Multiplier Related to Prediction Set s-   λp: Lagrange Multiplier Related to Reference Direction Combination    Index p-   λm: Lagrange Multiplier Related to Prediction Mode m(bk)-   λd: Lagrange Multiplier Related to Signal Distortion

When each of the parameters is determined, an encoding cost J(s, p, M)represented by the following equation (30) is calculated with respect toall combinations of prediction sets s, reference direction combinationindices p, and prediction modes M=(m(0), m(1), . . . , m(bk), . . . ) ofall sub blocks included in a target block to be encoded. Parameters(sbest, pbest, Mbest) that minimize the encoding cost J(s, p, M) aredetermined as parameters used for encoding the target block.

For calculation of the encoding cost J(s, p, M), it is necessary tocalculate an encoding amount of each parameter, and an encoding amountand a signal distortion of the sub block bk. On this account, the encodeparameter determining section 14 includes functional blocks thatrespectively correspond to the difference computing section 1, theorthogonal transformation section 2, the quantization section 3, theentropy encoding section 504, the inverse quantization section 6, theinverse orthogonal transformation section 7, the addition computingsection 8, the memory 9, the intra prediction section 10, the relativeprediction set information forming section 51, and the relativeprediction mode information forming section 61, though the functionalblocks are not shown.

$\begin{matrix}{\mspace{79mu}{{Math}.\mspace{14mu} 16}} & \; \\{{J\left( {s,p,M} \right)} = {{\lambda_{s} \cdot {R_{s}(s)}} + {\lambda_{p} \cdot {R_{p}(p)}} + {\sum\limits_{{bk} \in W}^{\;}\;\left\{ {{\lambda_{m} \cdot {R_{m}\left( {s,p,{m({bk})}} \right)}} + {\lambda_{d} \cdot {R_{d}\left( {s,p,{m({bk})}} \right)}} + {D_{d}\left( {s,p,{m({bk})}} \right)}} \right\}}}} & (30)\end{matrix}$

The process of determining the encode parameters (s, p, M) is describedbelow with reference to FIG. 37. FIG. 37 is a flowchart showing how theencode parameter determining section 41 determines the encode parameters(s, p, M).

Firstly, the encode parameter determining section 14 initializes aminimum value Jmin of an encoding cost to a sufficiently large value.Further, the encode parameter determining section 14 sets predeterminedinitial values to encode parameters (s, p, M) (Step S200). The encodeparameter determining section 14 calculates an encoding cost J(s, p, M)for a case of encoding all sub blocks included in a target block W witha combination of prediction modes M, by use of a prediction set s and aprediction direction combination index p (Step S201).

Subsequently, the minimum value Jmin of the encoding cost and encodeparameters (sbest, pbest, Mbest) at the minimum value Jmin are updated,and then the encode parameters (s, p, M) are updated.

More specifically, in the case of J(s, p, M)<Jmin, the minimum valueJmin of the encoding cost is set to J(s, p, M). Further, values of (s,p, M) at the time are set as values of the encode parameters (sbest,pbest, Mbest). In the case of J(s, p, M)≧Jmin, the Jmin and the encodeparameters (sbest, pbset, Mbest) are not updated. Further, a combinationof the encode parameters for calculating a subsequent encoding cost isset to (s, p, M) (Step S202).

Subsequently, it is determined whether or not the processes from StepS201 to Step S202 have been carried out with respect to all encodeparameters (s, p, M). If encoding costs have been calculated withrespect to all combinations of the encode parameters (s, p, M) (Yes inStep S203), Step S204 is carried out. If there is a combination of theencode parameters (s, p, M) to which the encoding cost has not been yetcalculated, the processes from Step S201 are carried out with respect tothe combination. That is, the processes of Steps S201 and S202 arerepeatedly carried out with respect to all the combinations of theprediction sets s, the reference direction combination indices p, andthe prediction modes M of all sub blocks included in the target block tobe encoded.

Encode parameters (sbest, pbest, Mbest) that give the minimum value Jminamong the encoding costs obtained through the processes from Step S201to Step S203 are determined as parameters for use in encoding (StepS204). The prediction set sbest thus determined is supplied to the intraprediction section 10, the relative prediction set information formingsection 51, and the relative prediction mode information forming section61. Further, the reference direction combination index pbest thusdetermined is supplied to the relative prediction mode informationforming section 61 and the entropy encoding section 504. Further, thedetermined prediction modes Mbest of all the sub blocks included in thetarget block to be encoded are supplied to the intra prediction section10 and the relative prediction mode information forming section 61.

(Additional Matters)

The present embodiment dealt with Table 20 as an example of thereference direction combination table where a sub block size is N=M/4 inthe reference direction determining section 613. However, the referencedirection combination table is not limited to this. For example, Table23 may be used instead of Table 20. For Table 23, it is preferable thatthe entropy encoding section 504 use a reference direction combinationindex code table shown in Table 24. Further, the present embodiment usesa reference direction combination table in which the correspondencerelation between the reference direction combination index and therespective reference directions of the sub-block groups differsdepending on which direction the prediction set information puts muchweight in, a horizontal direction or a vertical direction. However,reference direction combination tables shown in Tables 25 and 26 may bealso used regardless of the prediction set information. For Table 25, itis preferable that the entropy encoding section 504 use a referencedirection combination index code table shown in Table 27. Further, forTable 26, it is preferable that the entropy encoding section 504 use areference direction combination index code table shown in Table 28.

TABLE 23 Reference Direction Reference Direction Prediction Set FlagCombination Index B1 B2 B3 B4 0 0 0 0 0 0 (Mainly Horizontal Direction)1 0 0 0 1 2 0 0 1 0 3 0 1 0 0 4 1 0 0 0 5 0 0 1 1 6 0 1 1 0 7 1 1 0 0 81 0 0 1 1 0 1 1 1 1 (Mainly Vertical Direction) 1 1 1 1 0 2 1 1 0 1 3 10 1 1 4 0 1 1 1 5 0 0 1 1 6 0 1 1 0 7 1 1 0 0 8 1 0 0 1

TABLE 24 Reference Direction Combination Index Code 0 1 1 0000 2 0001 30010 4 0011 5 0100 6 0101 7 0110 8 0111

TABLE 25 Reference Direction Reference Direction Combination Index B1 B2B3 B4 0 0 0 0 0 1 1 1 1 1 2 0 0 1 1 3 0 1 1 0 4 1 1 0 0 5 1 0 0 1

TABLE 26 Reference Direction Reference Direction Combination Index B1 B2B3 B4 0 0 0 0 0 1 1 1 1 1 2 0 0 1 1 3 0 1 1 0 4 1 1 0 0 5 1 0 0 1 6 0 00 1 7 1 1 1 0 8 0 0 1 0 9 1 1 0 1 10 0 1 0 0 11 1 0 1 1 12 1 0 0 0 13 01 1 1

TABLE 27 Reference Direction Combination Index Code 0 10 1 11 2 000 3001 4 010 5 011

TABLE 28 Reference Direction Combination Index Code 0 110 1 111 2 0100 30101 4 0110 5 0111 6 00000 7 00001 8 00010 9 00011 10 00100 11 00101 1200110 13 00111

In the present embodiment, encoding units of the prediction set and thereference direction combination index is an M×M pixel block. However,the encoding unit is not limited to this. For example, the encoding unitof the prediction set may be a macro block, a slice, a picture (frame),or a GOP (Group Of Picture). In the case where the prediction set and acombination of the reference directions are changed per slice unit, itis necessary to encode information on a selected prediction set, at aheadmost part of the slice. The encoding units of the prediction set andthe reference direction combination index may be predetermined betweenan image encoding device and an image decoding device, or may bedesignated in a headmost piece of encoded data, a picture, or a GOPheader. Alternatively, it is also possible to notify the encoding unitby use of external means, not by the image encoding device and the imagedecoding device.

(Effects)

As described above, the image encoding device 500 determines, based onan encoding cost and per block unit constituting an image, (i) aprediction set to be applied to a target block, (ii) a referencedirection in which an encoded adjacent sub block is positioned and whichis commonly used for estimation of a prediction mode in a sub-blockgroup including a predetermined number of sub blocks, in the targetblock, and (iii) all prediction modes of the sub blocks in the targetblock. Further, the image encoding device 500 estimates a predictionmode for each target sub block constituting the target block, based on(a) the determined prediction set, (b) the determined referencedirection, (c) a prediction mode and a prediction set of an encoded subblock adjacent to the target sub block, and (d) a position of the targetsub block, and then encodes the prediction mode on the basis of theestimation. The arrangement allows the image encoding device 500 toselect a reference sub block to be used for estimating a prediction modeof the target sub block, thereby resulting in that accuracy inestimation of a prediction mode is improved, an encoding amountnecessary for the prediction mode is efficiently reduced, andadditionally, efficiency in encoding is improved. Furthermore, in thecase where the prediction set to be applied to the target sub block isdifferent from a prediction set applied to the reference sub block to beused for estimating a prediction mode, the image encoding device 500uses the aforementioned prediction mode correspondence table, so that aprediction mode applied to the reference sub block is converted into amost approximate prediction mode in the prediction set to be applied tothe target sub block. As a result, the accuracy in estimation of aprediction mode for the target sub block can be improved, the encodingamount necessary for the prediction mode can be efficiently reduced, andadditionally, the efficient in encoding can be improved. Further, theimage encoding device 500 uses variable length coding with respect toinformation (reference direction combination index) indicative of acombination of reference directions used for estimation of a predictionmode, according to a bias of the appearance frequency. This makes itpossible to restrain an increase in the encoding amount necessary forthe reference direction combination index.

[Embodiment 6]

Another embodiment of the image decoding device according to the presentinvention is explained below as Embodiment 6 with reference to FIG. 38through FIG. 41. The same constituent components as in Embodiments 1through 5 have the same reference signs as in Embodiments 1 through 5,and therefore are not explained here.

(Arrangement of Image Decoding Device 550)

An arrangement of an image decoding device 550 according to Embodiment 6is explained below with reference to FIG. 38. FIG. 38 is a block diagramshowing the arrangement of the image decoding device 550.

As shown in FIG. 38, the image decoding device mainly includes anentropy decoding section 505, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 10, a prediction setinformation forming section 52, and a prediction mode informationforming section 62. The present embodiment deals with only the entropydecoding section 505 and the prediction mode information forming section62, which have not been described yet.

(Entropy Decoding Section 505)

The entropy decoding section 505 carries out a process reverse to theprocess carried out by the entropy encoding section 504. Morespecifically, the entropy decoding section 505 carries out entropydecoding with respect to encoded data of prediction residual data,relative prediction mode information, a reference direction combinationindex, relative prediction set information, and the like information,and then outputs decoded data thereof.

The entropy decoding section 505 carries out the entropy decoding withrespect to encoded data (code) of the reference direction combinationindex into a reference direction combination index corresponding to thecode, by referring to a reference direction combination index codetable. The reference direction combination index thus decoded issupplied to the prediction mode information forming section 62. At thistime, it is preferable to use the same reference direction combinationindex code table as that used in the image encoding device 500. Further,a shared reference direction combination index code table may bepredetermined between the image encoded device 500 in Embodiment 5 andthe image decoding device 550 in the present embodiment, or may bedesignated by use of external notification means.

(Prediction Mode Information Forming Section 62)

The prediction mode information forming section 62 carries out a processreverse to the process carried out by the relative prediction modeinformation forming section 61. More specifically, the prediction modeinformation forming section 62 forms prediction mode information of atarget sub block on the basis of prediction set informationreconstructed by the prediction set information forming section 52, theentropy-decoded relative prediction mode information and theentropy-decoded reference direction combination, and decoded predictionset information and decoded prediction mode information of an adjacentsub block. The prediction mode information forming section 62 thenoutputs the prediction mode information thus formed.

The following explains about an arrangement of the prediction modeinformation forming section 62. FIG. 39 is a block diagram showing thearrangement of the prediction mode information forming section 62. Asshown in FIG. 39, the prediction mode information forming section 62includes a storing section 621 a, a storing section 621 b, a referencedirection determining section 622, a prediction mode informationestimating section 623, and a prediction mode information generationsection 624. Each of the members is explained below.

(Storing Sections 621 a, 621 b)

Similarly to the storing sections 611 a and 611 b in the relativeprediction mode information forming section 61, the storing sections 621a and 621 b temporarily store input information therein. The storingsection 621 a stores prediction mode information of the target subblock, which is generated in the prediction mode information generationsection 624. Further, the storing section 621 b receives prediction setinformation and stores it therein. The stored prediction modeinformation and prediction set information are used for estimatingprediction mode information of a subsequent sub block that will bedecoded after the target sub block.

(Reference Direction Determining Section 622)

Similarly to the reference direction determining section 612 in therelative prediction mode information forming section 61, the referencedirection determining section 622 receives the prediction setinformation and the reference direction combination index, and supplies,to the prediction mode information estimating section 623, a referencedirection in which an encoded adjacent sub block (reference sub block)used for estimating prediction mode information of a target sub block ispositioned. The reference direction is determined according to areference direction combination table, based on the received predictionset information, the received reference direction combination index, anda position (internally counted) of the target sub block. At this time,it is preferable to use the same reference direction combination tableas that in the image encoding device 500. Further, a shared referencedirection combination table may be predetermined between the imageencoding device 500 in Embodiment 5 and the image decoding device 550 inthe present embodiment, or may be designated by use of externalnotification means. How to determine the reference direction is the sameas in Embodiment 5, and therefore is not explained here.

(Prediction Mode Information Estimating Section 623)

The prediction mode information estimating section 623 determines anestimation value of prediction mode information, which is to be used forthe target sub block, by a predetermined method based on the receivedprediction set information, the reference direction determined by thereference direction determining section 622, and prediction modeinformation and prediction set information of a decoded adjacent subblock, respectively stored in the storing sections 621 a and 621 b. Theprediction mode information estimating section 623 then supplies thedetermined estimation value to the prediction mode informationgeneration section 624. How to determine the estimation value ofprediction mode information is the same as in the prediction modeinformation estimating section 613 in Embodiment 5, and therefore is notexplained here.

(Prediction Mode Information Generation Section 624)

The prediction mode information generation section 624 carries out aprocess reverse to the process carried out by the relative predictionmode information generation section 614. More specifically, theprediction mode information generation section 624 generates predictionmode information to be applied to the target sub block, based onreceived relative prediction mode information and the estimation valueprobable_mode of prediction mode information for the target sub block,which estimation value is determined by the prediction mode informationestimating section 623. Further, the prediction mode information thusgenerated is supplied to the storing section 621 a and the intraprediction section 10. A data structure of the prediction modeinformation mode_data( ) is shown in Table 29.

TABLE 29 Syntax Detail mode_data( ){ Prediction Mode Information  modeIndicative of Prediction Mode Used for Intra Prediction, for Target SubBlock }

An image decoding process in the image decoding device 500 is generallydescribed below with reference to FIG. 40. FIG. 40 is a flowchartschematically showing the image decoding process in the image decodingdevice 550.

The image decoding device 550 receives encoded data of a target block(M×M pixel block) to be decoded (Step S210).

The entropy decoding section 505 carries out entropy decoding withrespect to relative prediction set information and a reference directioncombination index each of the target block to be decoded, in thereceived encoded data, and outputs decoded data thereof (Step S211).

The prediction set information forming section 52 forms prediction setinformation of the target block to be decoded, based on the relativeprediction set information entropy-decoded in Step S211 and predictionset information that has been already decoded and stored therein (StepS212).

The entropy decoding section 505 carries out entropy decoding withrespect to encoded data of relative prediction mode information, andsupplies the relative prediction mode information thus decoded, to theprediction mode information forming section 62 (Step S213).

The prediction mode information forming section 62 forms prediction modeinformation of a target sub block based on (i) the prediction setinformation thus formed, (ii) the reference direction combination index,(iii) the relative prediction mode information of the target sub block,and (iv) prediction set information and prediction mode information of adecoded sub block that is adjacent to the target sub block (Step S214).

The entropy decoding section 505 further carries out entropy decodingwith respect to a quantization value of prediction residual data of thetarget sub block (Step S215). Here, the target sub block has apredetermined block size (N×N pixel block) by which the target block issubdivided.

The intra prediction section 10 carries out intra prediction andgenerates a predicted image (N×N pixel block) according to a predictionmode to be applied to the target sub block, by use of a locally decodedimage of decoded adjacent sub blocks, stored in the memory 9 (StepS216). How to generate the predicted image by the intra prediction hasbeen already explained in Embodiment 1, and therefore is not explainedhere.

The prediction residual data decoded in Step S215 is supplied to theinverse quantization section 6 and then to the inverse orthogonaltransformation section 7 so as to be subjected to inverse quantizationand inverse orthogonal transformation, respectively. The predictionresidual data is then supplied to the addition computing section 8 (StepS217).

The addition computing section 8 adds the predicted image thus generatedin Step S216 to the prediction residual data thus subjected to theinverse quantization and the inverse orthogonal transformation in StepS217, so as to form a decoded image (N×N pixel block) of the target subblock. The addition computing section 8 then outputs the decoded image(Step S218).

The memory 9 stores therein the decoded image of the target sub block,generated in Step S218 (Step S219).

The image decoding device 550 repeats the processes from Step S213 toStep S219 with respect to all sub blocks constituting the target blockto be decoded. Further, the image decoding device 550 repeats theprocesses from Step S210 through Step S219 with respect to all blocksconstituting a target image to be decoded.

The present embodiment explained about the decoding process in the imagedecoding device 550 in the order from Step S210 to Step S219. However,the order of the decoding process is not limited to this, and can bealtered within a range in which the present invention can be carriedout.

(Details of Process of Forming Prediction Mode Information)

A process of forming prediction mode information is explained below withreference to FIG. 41. FIG. 41 is a flowchart specifically showing theprocess of forming prediction mode information.

Initially, the reference direction determining section 622 receivesprediction set information and a reference direction combination index,and determines a reference direction of a reference sub block to be usedfor estimating prediction mode information, according to the referencedirection combination table, based on the prediction set information,the reference direction combination index, and a position of the targetsub block (Step S220). The reference direction determining section 622then supplies the reference direction thus determined to the predictionmode information estimating section 623.

The prediction mode information estimating section 623 obtainsprediction mode information and prediction set information of areference sub block indicated by the received reference direction,respectively from the storing section 621 a and the storing section 621b (Step S221). Subsequently, the prediction mode information estimatingsection 623 determines an estimation value of a prediction mode for thetarget sub block, according to the prediction mode correspondence table,based on the obtained prediction mode information and prediction setinformation of the reference sub block, and the prediction setinformation of the target sub block (Step S222). The determinedestimation value is supplied to the prediction mode informationgeneration section 624.

The prediction mode information generation section 624 receives relativeprediction mode information and the estimation value of prediction modeinformation for the target sub block, and then generates prediction modeinformation of the target sub block based on the relative predictionmode information and the estimation value. The prediction modeinformation generation section 624 then outputs the prediction modeinformation (Step S223).

Finally, the storing sections 621 a and 621 b respectively store theprediction mode information and the prediction set information each ofthe target sub block therein (Step S224).

In the present embodiment, decoding units of the prediction set and thereference direction combination index are an M×M pixel block. However,the decoding units are not limited to this. For example, the decodingunits may be a macro block, a slice, a picture (frame), or a GOP (GroupOf Picture). For example, in the case where the prediction set and thecombination of reference directions are changed per slice unit, it isnecessary to decode information on a selected prediction set and aselected combination of reference directions at a headmost part of theslice. The decoding units of the prediction set and the referencedirection combination index may be predetermined between an imageencoding device and an image decoding device, or may be designated in aheadmost piece of encoded data, a picture, or a GOP header.Alternatively, it is also possible to notify the decoding unit by use ofexternal means, not by the image encoding device and the image decodingdevice.

(Effects)

As described above, the image decoding device 550 includes a predictionset group constituted by a plurality of prediction sets having differentcombinations of a plurality of prediction modes corresponding torespective prediction directions different from each other. The imagedecoding device 550 decodes prediction set information to be applied toa target block to be decoded, which constitutes an image, with the useof relative prediction set information of the target block andprediction set information that has been already decoded. Then, theimage decoding device 550 decodes a reference direction combinationindex indicative of a combination of reference directions to be used forestimating prediction modes of all sub blocks in the target block.Subsequently, the image decoding device 550 determines an estimationvalue of a prediction mode for a target sub block based on theprediction set information thus decoded, the reference directioncombination index thus decoded, and prediction set information andprediction mode information of a decoded sub block adjacent to thetarget sub block. The image decoding device 550 then decodes predictionmode information based on the estimation value thus determined andrelative prediction mode information of the target sub block. Thedetermination of an estimation value and the decoding of prediction modeinformation are carried out per sub block unit by which the target blockis subdivided. This arrangement allows the image decoding device 550 toselect a reference sub block to be used for estimating a prediction modefor a target sub block, thereby improving accuracy in estimation of aprediction mode and reducing an encoded amount of the prediction mode,which is to be decoded. Further, in the case where a prediction set ofthe target sub block is different from a prediction set of the referencesub block to be used for estimation of a prediction mode, the imagedecoding device 550 uses the aforementioned prediction modecorrespondence table, so that a prediction mode applied to the referencesub block is converted into a most approximate prediction mode in theprediction set of the target sub block. As a result, the accuracy inestimation of a prediction mode of the target sub block can be improved,and the encoded amount of the prediction mode, which is to be decoded,can be efficiently reduced. Further, the image decoding device 550decodes the reference direction combination index, with the use of avariable-length code according to a bias of the appearance frequency.This makes it possible to restrain an increase in the encoded amount ofthe reference direction combination index, which is to be decoded.

[Embodiment 7]

Another embodiment of the image encoding device according to the presentinvention is explained below as Embodiment 7 with reference to FIG. 42through FIG. 49. The same constituent components as in Embodiments 1through 6 have the same reference signs as in Embodiments 1 through 6,and therefore are not explained here.

Embodiment 5 dealt with a case where prediction set information is usedfor determining a reference sub block to be used for estimating aprediction mode of a target sub block. The present embodiment explainsabout an image encoding device which uses, not the prediction setinformation, but prediction modes of encoded sub blocks positionedaround the target sub block to determine the reference sub block to beused for estimating a prediction mode of the target sub block.

(Arrangement of Image Encoding Device 600)

An arrangement of an image encoding device 600 according to the presentembodiment is explained below with reference to FIG. 42. FIG. 42 is ablock diagram showing the arrangement of the image encoding device 600according to the present embodiment. The image encoding device 600includes a difference computing section 1, an orthogonal transformationsection 2, a quantization section 3, an entropy encoding section 304, aninverse quantization section 6, an inverse orthogonal transformationsection 7, an addition computing section 8, a memory 9, an intraprediction section 310, a prediction mode determining section 311, and arelative prediction mode information forming section 661. The presentembodiment explains about the relative prediction mode informationforming section 661, which has not been described yet.

(Relative Prediction Mode Information Forming Section 661)

The relative prediction mode information forming section 661 formsrelative prediction mode information of a target sub block based on (a)prediction mode information received from the prediction modedetermining section 311 and (b) prediction mode information of anencoded sub block that has been already encoded, stored inside therelative prediction mode information forming section 661.

An arrangement of the relative prediction mode information formingsection 661 is described below with reference to FIG. 43. FIG. 43 is ablock diagram showing the arrangement of the relative prediction modeinformation forming section 661.

The relative prediction mode information forming section 661 includes astoring section 662, a reference position determining section 663, aprediction mode information estimating section 664, and a relativeprediction mode information generation section 665, as shown in FIG. 43.

(Storing Section 662)

The storing section 662 stores the received prediction mode informationof a target sub block therein. The prediction mode information thusstored is used for estimating prediction mode information of asubsequent sub block that will be encoded after the target sub block isencoded.

(Reference Position Determining Section 663)

The reference position determining section 663 determines a sub block(reference sub block) that is most correlated with the target sub blockis determined from 4 sub blocks (adjacent sub blocks A, B, C, and D inFIG. 44) adjacent to the target sub blocks, with the use of pieces ofprediction mode information of encoded sub blocks positioned around thetarget sub block. The reference position determining section 663supplies position information (reference position information) of thedetermine reference sub block to the prediction mode informationestimating section 664. In the present embodiment, the target sub blockis referred to as a target sub block O.

(Prediction Mode Information Estimating Section 664)

The prediction mode information estimating section 664 determines anestimation value of prediction mode information, which is to be used forthe target sub block, by a predetermined method on the basis of (a) thereference position information determined by the reference positiondetermining section 663 and (b) prediction mode information of a decodedadjacent sub block, stored in the storing section 662. The predictionmode information estimating section 664 then supplies the determinedestimation value to the prediction mode information generation section665.

(Relative Prediction Mode Information Generation Section 665)

The relative prediction mode information generation section 665 has thesame function as the relative prediction mode information generationsection 614. More specifically, the relative prediction mode informationgeneration section 665 receives the prediction mode information and theestimation value probable_mode of prediction mode information,determined by the prediction mode information estimating section 664,and generates relative information (relative prediction modeinformation) of a prediction mode of the target sub block with respectto the estimation value, based on the prediction mode information andthe estimation value probable_mode. Further, the relative predictionmode information thus generated is supplied to the entropy encodingsection 304. A data structure of the relative prediction modeinformation relative_mode_data( ) is the same as in Table 18.

(Overview of Image Encoding Process)

An image encoding process in the image encoding device 600 is generallydescribed below with reference to FIG. 45. FIG. 45 is a flowchartschematically showing the image encoding process in the image encodingdevice 600.

The image encoding device 600 receives a target sub block (N×N pixelblock) to be encoded (Step S230).

The prediction mode determining section 311 determines a prediction modeof the target sub block to be encoded based on an original image of thetarget sub block to be encoded and a locally decoded image (N×N pixelblock) stored in the memory 9 (Step S231). Prediction mode informationon the determined prediction mode is supplied to the intra predictionsection 310 and the relative prediction mode information forming section661.

The relative prediction mode information forming section 661 formsrelative prediction mode information of the target sub block to beencoded based on the prediction mode information of the target subblock, received from the prediction determining section 311, andprediction mode information of a reference sub block. The relativeprediction mode information forming section 661 outputs the relativeprediction mode information thus formed (Step S232).

The entropy encoding section 304 carries out entropy encoding withrespect to the relative prediction mode information and outputs encodeddata of the relative prediction mode information (Step S233).

The intra prediction section 310 carries out intra prediction defined bythe prediction mode determined in Step S231 with the use of a locallydecoded image of encoded adjacent sub blocks, obtained from the memory9, and generates a predicted image of the target sub block to be encoded(Step S234). The generated predicted image of the target sub block issupplied to the difference computing section 1 and the additioncomputing section 8. How to generate the predicted image is the same asthe conventional technique, and therefore is not explained here.

The difference computing section 1 calculates prediction residual dataof the target sub block to be encoded, which is a difference between theinputted original image of the target sub block to be encoded and thepredicted image generated in Step S234, and then outputs the predictionresidual data (Step S235).

The prediction residual data thus calculated in Step S235 is supplied tothe orthogonal transformation section 2 and then to the quantizationsection 3 so as to be subjected to orthogonal transformation andquantization, respectively. The prediction residual data is thensupplied to the entropy encoding section 304 and the inversequantization section 6 (Step S236).

The prediction residual data thus subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization section 6 and then to the inverse orthogonal transformationsection 7 so as to be subjected to inverse quantization and inverseorthogonal transformation, respectively. The prediction residual data isthen supplied to the addition computing section 8 (Step S237).

The addition computing section 8 adds the prediction residual data thussubjected to the inverse quantization and the inverse orthogonaltransformation in Step S237, to the predicted image generated in StepS234, so as to generate a locally decoded image of the target sub block(Step S238). The locally decoded image thus generated is then stored inthe memory 9.

The entropy encoding section 304 carries out entropy encoding withrespect to the quantized prediction residual data of the target subblock, and outputs encoded data of the prediction residual data (StepS239).

The image encoding device 600 carries out the processes from Step S230to Step S239 with respect to all sub blocks constituting a target imageto be encoded.

The present embodiment dealt with the encoding process in the imageencoding device 600 in the order from Step S230 to Step S239. However,the order of the encoding process is not limited to this, and can bealternated within a range in which the present invention can be carriedout.

(Details of how to Determine Reference Sub Block)

The following describes how to determine a reference sub block.Initially explained is a relative position of a sub block Q with respectto a target sub block P. As illustrated in FIG. 46, when a horizontaldirection is taken as an X axis (positive numbers are on the right ofzero) and a vertical direction is taken as a Y axis (positive numbersare on the downside of zero) where the target sub block P is taken as abase point (0, 0), the relative position of Q with respect to P isexpressed as (x, y). For example, relative positions of sub blocks A, B,C, and D each adjacent to the target sub block are expressed as (−1, 0),(0, −1), (−1, −1), and (1, −1), respectively.

A connection degree of the sub block Q positioned at the relativeposition (x, y) with respect to the target sub block P is defined asSp(x, y). The connection degree Sp(x, y) is a cost function indicating adegree of correlation between the target sub block P and the sub block Qat the relative position (x, y), and is represented by the followingequation (31). As a value of the connection degree Sp(x, y) becomeslarge, the correlation between the target sub block P and the sub blockQ is more strong.

Math. 17S _(p)(x,y)=w _(p) ×w _(q) ×d  (31)

In the equation (31), wp is a weighting factor indicative of a degreethat a prediction mode approximate to a prediction mode mp of the subblock P emerges in the sub block Q. Similarly, wq is a weighing factorindicative of a degree that a prediction mode approximate to aprediction mode mq of the sub block Q emerges in the sub block P.

The weighting factors wp and wq are defined by the prediction modes mpand mq and the relative position (x, y), by referring to Table 30.Weighting factors w1 and w2 in Table 30 have a magnitude relationrepresented by the following expression (32). As a value of a weightingfactor wi becomes larger, an approximate prediction mode emerges withhigher probability.

Math. 180≦w ₂ ≦w ₁  (32)

TABLE 30 Relative Position of Sub Block (−1, 0) (0, −1) (−1, −1) (1, −1)Prediction Mode 0 w2 w1 w2 w2 1 w1 w2 w2 w2 2 w2 w2 w2 w2 3 w2 w2 w2 w14 w2 w2 w1 w2 5 w2 w1 w2 w2 6 w1 w2 w2 w2 7 w2 w1 w2 w2 8 w1 w2 w2 w2

For example, in the case where the prediction mode mp of the target subblock P is a prediction mode 1 (prediction in a horizontal direction),an approximate prediction mode most probably emerges at a sub blockpositioned on the left of the target sub block P (at a relative position(−1, 0)) among four relative positions. On this account, the weightingfactor of the relative position (−1, 0) is set to a larger value w1, andthe weighing factors of the other relative positions (0, −1), (−1, −1),and (1, −1) are set to a smaller value w2. The values of the weightingfactors are not limited to the 2 types, w1 and w2.

Further, in the equation (31), d is a degree of similarity indicative ofhow much the prediction mode mp of the target sub block P is approximateto the prediction mode mq of the sub block Q, and is found by use ofTable 31. In Table 31, di (i=1, 2, 3, 4, 5) is a predetermined valueindicative of the degree of similarity, and values of di have amagnitude relation represented by the following expression (33). As thevalue of di becomes larger, the degree of similarity becomes higher.

Math. 190≦d ₅ ≦d ₄ ≦d ₃ ≦d ₂ ≦d ₁  (33)

TABLE 31 Prediction Mode mg of Sub Block Q 0 1 2 3 4 5 6 7 8 PredictionMode mp of 0 d1 d5 d3 d3 d3 d2 d4 d2 d4 Target Sub Block P 1 d5 d1 d3 d3d3 d4 d2 d4 d2 2 d3 d3 d1 d3 d3 d3 d3 d3 d3 3 d3 d3 d3 d1 d5 d4 d4 d2 d24 d3 d3 d3 d5 d1 d2 d2 d4 d4 5 d2 d4 d3 d4 d2 d1 d3 d3 d5 6 d3 d2 d3 d4d2 d3 d1 d5 d3 7 d2 d4 d3 d2 d4 d3 d5 d1 d3 8 d4 d2 d3 d2 d4 d5 d3 d3 d1

In the case where the prediction mode mp is a prediction mode 1(prediction in a horizontal direction), for example, if the predictionmode mq is also the prediction mode 1, prediction directions of theprediction modes are identical with each other. On this account, thedegree of similarity is set to the largest value d1. Further, if mq is aprediction mode 6 or 8, which is most approximate to the prediction mode1 in FIG. 68, the degree of similarly is set to d2. Further, if mq is aprediction mode 3 or 4, which is second-most approximate to theprediction mode 1 in FIG. 68, the degree of similarity is set to d3.Furthermore, if mq is a prediction mode 5 or 7, which is third-mostapproximate to the prediction mode 1 in FIG. 68, the degree ofsimilarity is set to d4. Moreover, if mq is a prediction mode 0, whichis most different from the prediction mode 1 in FIG. 68, the degree ofsimilarity is set to d5. If mq is a prediction mode 2, the degree ofsimilarity is set to d3, which is an intermediate value among d1 throughd5. However, the values of the degree of similarity is not limited tothe 5 types, from d1 through d5. The degree of similarity d ispreferably set based on a characteristic of how probably a predictionmode more approximate to the prediction mode mp of the target sub blockP emerges in an adjacent sub block. For example, it is preferable to setthe degree of similarity d based on an initially-calculated appearanceprobability (simultaneous occurrence probability) of the prediction modemq with respect to the prediction mode mp.

Subsequently, in each of the sub blocks A, B, C, and D adjacent to thetarget sub block O, connection degrees Sp(x, y) (p=a, b, c, d) withrespect to 4 relative positions (−1, 0), (0, −1), (−1, −1), and (1, −1)are found. For example, for the adjacent sub block A, Sa(−1, 0), Sa(0,−1), Sa(−1, −1), and Sa(1, −1) are found.

Then, connection degrees So(x, y) of the target sub block O with respectto its relative positions (−1, 0), (0, −1), (−1, −1) are estimated byuse of the following equations (34) through (37), on the basis of thusfound connection degrees Sp(x, y) of each of the adjacent sub blocks A,B, C, D. In the following equations (34) through (37), in the case wherethere is a connection degree Sp(x, y) that cannot be obtained, among theconnection degrees Sp(x, y) of the adjacent sub blocks A, B, C, and D(for example, an adjacent sub block is positioned outside the targetimage to be encoded), it is preferable to substitute a predeterminedvalue for the connection degree.

Math. 20S _(o)(−1,0)={S _(a)(−1,0)+S _(b)(−1,0)+S _(c)(−1,0)+S_(d)(−1,0)}/4  (34)S _(o)(0,−1)={S _(a)(0,−1)+S _(b)(0,−1)+S _(c)(0,−1)+S_(d)(0,−1)}/4  (35)S _(o)(−1,−1)={S _(a)(−1,−1)+S _(b)(−1,−1)+S _(c)(−1,−1)+S_(d)(−1,−1)}/4  (36)S _(o)(1,−1)={S _(a)(1,−1)+S _(b)(1,−1)+S _(c)(1,−1)+S_(d)(1,−1)}/4  (37)

Among the connection degrees So(x, y) estimated according to the aboveequations (34) through (37), a relative position (x, y) that gives thelargest connection degree is determined as a reference sub block of thetarget sub block O. In the case where there are several connectiondegrees having the same value, it is preferable to determine apredetermined relative position (x, y) as the reference sub block of thetarget sub block O.

(Operation Process of Relative Prediction Mode Information FormingSection 661)

The following describes how the relative prediction mode informationforming section 661 forms relative prediction mode information, withreference to FIG. 47. FIG. 47 is a flowchart specifically showing aprocess of generating the relative prediction mode information.

Initially, the storing section 662 receives prediction mode informationand stores it therein (Step S240). The reference position determiningsection 663 estimates correlations between a target sub block andadjacent sub blocks (A, B, C, D) on the basis of pieces of predictionmode information of a plurality of encoded sub blocks positioned aroundthe target sub block (Step S241). The pieces of prediction modeinformation are supplied from the storing section 662.

Then, the reference position determining section 663 determines, fromthe adjacent sub blocks A, B, C, and D, a reference sub block to be usedfor estimating a prediction mode of the target sub block, based on thecorrelations found in Step S241 (Step S242). Reference positioninformation indicative of a position of the determined reference subblock is supplied to the prediction mode information estimating section664.

The prediction mode information estimating section 664 obtainsprediction mode information of the reference sub block indicated by thereference position information thus received, from the storing section662 (Step S243). The prediction mode information estimating section 664determines an estimation value of prediction mode information for thetarget sub block, based on the obtained prediction mode information ofthe reference sub block, and supplies the determined estimation value tothe relative prediction mode information generation section 665 (StepS244).

The relative prediction mode information generation section 665generates relative prediction mode information of the target sub blockbased on the prediction mode information of the target sub block and theestimation value of prediction mode information, and outputs therelative prediction mode information (Step S245).

(Modified Example)

The following describes relative prediction mode information formingsection 661 b as a modified example of Embodiment 7. The relativeprediction mode information forming section 661 b determines a referencesub block by use of locally decoded images of adjacent sub blocks thathave been already encoded, instead of using pieces of prediction modeinformation of the encoded adjacent sub blocks.

The relative prediction mode information forming section 661 inEmbodiment 7 exemplifies a case where the reference sub block to be usedfor estimating a prediction mode of a target sub block to be encoded isdetermined based on pieces of prediction mode information of adjacentsub blocks that have been already encoded.

(Arrangement of Image Encoding Device 600 b)

An arrangement of an image encoding device 600 b employing the relativeprediction mode information forming section 661 b is explained belowwith reference to FIG. 48. The image encoding device 600 b mainlyincludes a difference computing section 1, an orthogonal transformationsection 2, a quantization section 3, an entropy encoding section 304, aninverse quantization section 6, an inverse orthogonal transformationsection 7, an addition computing section 8, a memory 9, an intraprediction section 310, a prediction mode determining section 331, and arelative prediction mode information forming section 661 b. Thefollowing describes the relative prediction mode information section 661b.

(Relative Prediction Mode Information Forming Section 661 b)

The relative prediction mode information forming section 661 b formsrelative prediction mode information of a target sub block, based onprediction mode information received from the prediction modedetermining section 311 and locally decoded images of encoded sub blocksadjacent to the target sub block, stored in the memory 9.

An arrangement of the relative prediction mode information formingsection 661 b is described below with reference to FIG. 49. FIG. 49 is ablock diagram showing the arrangement of the relative prediction modeinformation forming section 661 b.

The relative prediction mode information forming section 661 b includesa storing section 662, a reference position determining section 663 b, aprediction mode information estimating section 664, and a relativeprediction mode information generation section 665, as shown in FIG. 49.The following describes the reference position determining section 663b.

(Reference Position Determining Section 663 b)

The reference position determining section 663 b determines a sub block(reference sub block) that is most correlated with a target sub blockamong 4 sub blocks (adjacent sub blocks A, B, C, D in FIG. 44) adjacentto the target sub block, by use of locally decoded images of encoded subblocks positioned around the target sub block. The reference positiondetermining section 663 then supplies position information (referenceposition information) of the determined reference sub block to theprediction mode information estimating section 664. In the presentembodiment, the target sub block is referred to as a target sub block O.

(Overview of Image Encoding Process)

An image encoding process in the image encoding device 600 b is almostthe same as the image encoding process in the image encoding device 600,except for Step S232. Therefore, the same steps are not explained here.The following deals with Step S232 in the image encoding process in theimage encoding device 600 b, which differs from Step S232 in the imageencoding process of the image encoding device 600.

The relative prediction mode information forming section 661 b formsrelative prediction mode information of the target sub block to beencoded, on the basis of (a) prediction mode information of the targetsub block, received from the prediction mode determining section 311,and (b) locally decoded images of encoded sub blocks positioned aroundthe target sub block, supplied from the memory 9. The relativeprediction mode information forming section 661 b then outputs therelative prediction mode information thus formed (Step S232).

(Details of how to Determine Position of Reference Sub Block)

The following describes how to determine a position of a reference subblock with the use of locally decoded images of encoded sub blockspositioned around the target sub block.

The reference position determining section 663 uses a cost functionf(θp, θq, Tp, Tq) instead of the connection degree Sp(x, y), to evaluatea correlation between a target sub block and a sub block Q positioned ata relative position (x, y). Variable values θp and θq respectivelyindicate a dominant edge orientation in the target sub block P and adominant edge orientation in the sub block Q at the relative position(x, y). Further, Tp and Tq respectively indicate an edge strength of thetarget sub block P and an edge strength of the sub block Q at therelative position (x, y). How to calculate the edge orientation and theedge strength has been already described in Embodiment 1, and thereforeis not explained here.

Examples of the cost function f(θp, θq, Tp, Tq) may be represented bythe following equations (38) and (39).

Math. 21f(θ_(p),θ_(q) ,T _(p) ,T _(q))=|θ_(p)−θ_(q)|^(α) ×|T _(p) −T_(q)|^(β)  (38)f(θ_(p),θ_(q) ,T _(p) ,T _(q))=γ|θ_(p)−θ_(q) |+ε|T _(p) −T _(q)|  (39)

The equation (38) is a cost function f(θp, θq, Tp, Tq) of a product ofan absolute value of a difference between the edge orientations θp andθq and an absolute value of a difference between the edge strengths Tpand Tq. Further, the equation (39) is a cost function f(θp, θq, Tp, Tq)of a sum of the absolute value of the difference between the edgeorientations θp and θq and the absolute value of the difference betweenthe edge strengths Tp and Tq. In the equations (38) and (39), parametersα, β, γ, and ε are predetermined scaling variables.

In these cost functions f(θp, θq, Tp, Tq) expressed by the equations(38) and (39), as the value becomes smaller, the correlation between thetarget sub block P and the sub block Q at the relative position (x, y)becomes stronger. In the present embodiment, the cost function f(θp, θq,Tp, Tq) between the target sub block P and the sub block Q positioned atthe relative position (x, y) with respect to the target sub block P isreferred to as fp(x, y), for convenience.

Subsequently, in each of the sub blocks A, B, C, and D adjacent to thetarget sub block O in FIG. 44, cost functions fp(x, y) with respect to 4relative positions (−1, 0), (0, −1), (−1, −1), and (1, −1) are found.For example, for the adjacent sub block A, fa(−1, 0), fa(0, −1), fa(−1,−1), and fa(1, −1) are found.

Then, cost functions fo(x, y) of the target sub block O with respect toits relative positions (−1, 0), (0, −1), (−1, −1) are estimated inaccordance with the following equations (40) through (43), on the basisof thus found cost functions fp(x, y) of each of the adjacent sub blocksA, B, C, D. In the following equations (40) through (43), in the casewhere there is a cost function fp(x, y) that cannot be obtained, amongthe cost functions fp(x, y) of the adjacent sub blocks A, B, C, and D,it is preferable to substitute a predetermined value for the costfunction.

Math. 22f _(o)(−1,0)={f _(a)(−1,0)+f _(b)(−1,0)+f _(c)(−1,0)+f_(d)(−1,0)}/4  (40)f _(o)(0,−1)={f _(a)(0,−1)+f _(b)(0,−1)+f _(c)(0,−1)+f_(d)(0,−1)}/4  (41)f _(o)(−1,−1)={f _(a)(−1,−1)+f _(b)(−1,−1)+f _(c)(−1,−1)+f_(d)(−1,−1)}/4  (42)f _(o)(1,−1)={f _(a)(1,−1)+f _(b)(1,−1)+f _(c)(1,−1)+f_(d)(1,−1)}/4  (43)

Among the cost functions fo(x, y) estimated according to the aboveequations (40) through (43), a relative position (x, y) that gives thesmallest cost is determined as a reference sub block of the target subblock O. In the case where there are several costs having the samevalue, it is preferable to determine a predetermined relative position(x, y) as the reference sub block of the target sub block O.

(Details of Process of Forming Relative Prediction Mode Information)

A process of forming relative prediction mode information is almost thesame as in the process of the relative prediction mode informationforming section 661, except for Step S241. Therefore, the same steps arenot explained here. The following describes Step S241 in the modifiedexample, which differs from S241 in the process in the relativeprediction mode information forming section 661.

The reference position determining section 663 b calculates pieces ofedge information from locally decoded images of a plurality of encodedsub blocks positioned around the target sub block. The locally decodedimages are supplied from the memory 9. The reference positiondetermining section 663 b then estimates correlations between the targetsub block and adjacent sub blocks (A, B, C, D) based on the pieces ofedge information thus calculated (Step S241).

(Additional Matters)

In the present embodiment and the modified example of the presentembodiment, a selection unit of a sub block position to be used forestimation of a prediction mode is a sub block unit. However theselection unit is not limited to this. For example, the selection unitof the sub block position may be a macro block, a slice, a picture(frame) or a GOP (Group Of Picture). The selection unit of the sub blockposition to be used for estimation of a prediction mode may bepredetermined between an image encoding device and an image decodingdevice, or may be designated at a headmost piece of encoded data, apicture, or a GOP header. Alternatively, it is also possible to notifythe selection unit by use of external means, not by the image encodingdevice and the image decoding device. Further, in the present embodimentand the modified example thereof, the adjacent sub blocks used forestimation of a prediction mode are the adjacent sub blocks A, B, C, andD in FIG. 44, but are not limited to these. For example, the adjacentsub blocks to be used for estimation of a prediction mode may be onlysub blocks A and B, or encoded sub blocks adjacent to the target subblock in addition to the sub blocks A, B, C, and D.

(Effects)

As described above, the image encoding device 600 according to thepresent embodiment includes at least one prediction set including aplurality of prediction modes corresponding to respective predictiondirections different from each other.

The image encoding device 600 estimates correlations between a targetsub block and adjacent sub blocks, by a predetermined method, frompieces of prediction mode information of encoded adjacent sub blocks orfrom decoded images of encoded adjacent sub blocks. The estimation iscarried out per sub block into which a target block to be encoded,constituting an image, is subdivided. Subsequently, the image encodingdevice 600 selects an encoded adjacent sub block that is most correlatedwith the target sub block, based on the result of thus estimatedcorrelations, and then estimates a prediction mode for the target subblock from a prediction mode of the encoded adjacent sub block thusselected. The image encoding device 600 encodes the prediction mode onthe basis of the estimation.

This arrangement allows the image encoding device 600 to select a subblock that is most correlated with the target sub block, therebyimproving accuracy in estimation of a prediction mode of the target subblock, reducing an encoded amount necessary for the prediction mode, andincreasing efficiency in encoding.

[Embodiment 8]

Another embodiment of the image decoding device according to the presentinvention is explained below as Embodiment 8 with reference to FIG. 50through FIG. 55. The same constituent components as in Embodiments 1through 7 have the same reference signs as in Embodiments 1 through 7,and therefore are not explained here.

(Arrangement of Image Decoding Device 650)

An arrangement of an image decoding device 650 according to Embodiment 8is described below with reference to FIG. 50. FIG. 50 is a block diagramshowing the arrangement of the image decoding device 650.

As shown in FIG. 50, the image decoding device 650 mainly includes anentropy decoding section 305, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 310, and a predictionmode information forming section 666. The present embodiment describesonly the prediction mode information forming section 662 below.

(Prediction Mode Information Forming Section 666)

The prediction mode information forming section 666 carries out aprocess reverse to the process carried out by the relative predictionmode information forming section 661 in Embodiment 7. More specifically,the prediction mode information forming section 666 forms predictionmode information of a target sub block to be decoded, based on (a)entropy-decoded relative prediction mode information of the target subblock and (b) pieces of prediction mode information of decoded subblocks positioned around the target sub block, stored inside theprediction mode information forming section 666.

An arrangement of the prediction mode information forming section 666 isdescribed below with reference to FIG. 51. As shown in FIG. 51, theprediction mode information forming section 666 includes a storingsection 667, a reference position determining section 668, a predictionmode information estimating section 669, and a prediction modeinformation generation section 670.

(Storing Section 667)

The storing section 667 has a function similar to the storing section662 of the relative prediction mode information forming section 661.More specifically, the storing section 667 stores prediction modeinformation of the target sub block, generated by the prediction modeinformation generation section 670. The prediction mode information thusstored is used for estimating prediction mode information of asubsequent sub block which will be decoded after the target sub block isdecoded.

(Reference Position Determining Section 668)

The reference position determining section 668 has a function similar tothe reference position determining section 663 of the relativeprediction mode information forming section 661. That is, the referenceposition determining section 668 determines a sub block (reference subblock) that is most correlated with the target sub block among four subblocks (adjacent sub blocks A, B, C, D) adjacent to the target subblock, with the use of pieces of prediction mode information of decodedsub blocks positioned around the target sub blocks. The referenceposition determining section 668 then supplies position information(reference position information) of the determined reference sub blockto the prediction mode information estimating section 669. How todetermine the reference sub block is the same as in the referenceposition determining section 663 in Embodiment 7, and therefore is notexplained here.

(Prediction Mode Information Estimating Section 669)

The prediction mode information estimating section 669 has a functionsimilar to the prediction mode information estimating section 664 of therelative prediction mode information forming section 661. Morespecifically, the prediction mode information estimating section 669determines an estimation value of prediction mode information, which isto be used for the target sub block, by a predetermined method based onthe reference position information determined by the reference positiondetermining section 668 and prediction mode information, stored in thestoring section 667, of a decoded adjacent sub block. The predictionmode information estimating section 669 then supplies the determinedestimation value to the prediction mode information generation section670.

(Prediction Mode Information Generation Section 670)

The prediction mode information generation section 670 carries out aprocess reverse to the process carried out by the relative predictionmode information generation section 665. More specifically, theprediction mode information generation section 670 receives relativeprediction mode information of the target sub block and the estimationvalue probable_mode of prediction mode information, determined by theprediction mode information estimating section 669, and generatesprediction mode information to be applied to the target sub block on thebasis of the relative prediction mode information and the estimationvalue probable_mode. Further, the prediction mode information thusgenerated is supplied to the storing section 667 and the intraprediction section 310. A data structure of the prediction modeinformation mode_data( ) is the same as in Table 29.

(Overview of Image Decoding Process)

An image decoding process in the image decoding device 650 is generallydescribed with reference to FIG. 52. FIG. 52 is a flowchartschematically showing the image decoding process in the image decodingdevice 650.

The image decoding device 650 receives encoded data of a target subblock (N×N pixel block) to be decoded (Step S250).

The entropy decoding section 305 carries out entropy decoding withrespect to encoded data of relative prediction mode information to beapplied to the target sub block to be decoded, in the received encodeddata, and then supplies the relative prediction mode information to theprediction mode information forming section 666 (Step S251).

The prediction mode information forming section 666 forms predictionmode information of the target sub block based on the received relativeprediction mode information of the target sub block and pieces ofprediction mode information of decoded sub blocks positioned around thetarget sub block (Step S252).

The entropy decoding section 305 carries out entropy decoding withrespect to encoded data of prediction residual data (Step S253).

The intra prediction section 310 carries out intra prediction accordingto the decoded prediction mode information with the use of a locallydecoded image, stored in the memory 9, of decoded adjacent sub blocks,and generates a predicted image (N×N pixel block) of the target subblock (Step S254). How to generate the predicted image is the same asthe conventional technique, and therefore is not explained here.

The prediction residual data decoded in Step S253 is supplied to theinverse quantization section 6 and then to the inverse orthogonaltransformation section 7 so as to be subjected to inverse quantizationand inverse orthogonal transformation, respectively. The predictionresidual data is then supplied to the addition computing section 8 (StepS255).

The addition computing section 8 adds the predicted image generated inStep S254 to the prediction residual data thus subjected to the inversequantization and the inverse orthogonal transformation in Step S255, soas to generate a decoded image (N×N pixel block) of the target subblock. The addition computing section 8 then outputs the decoded image(Step S256).

The memory 9 receives and stores the generated decoded image of thetarget sub block (Step S257).

The image decoding device 650 repeats the processes from Step S250 toStep S257 with respect to all sub blocks constituting a target image tobe decoded.

The present embodiment described the decoding process in the imagedecoding device 650 in the order from Step S250 to Step S257. However,the decoding process is not limited to this order, and can be alteredwithin a range in which the present invention can be carried out.

(Operation Process of Prediction Mode Information Forming Section 662)

The following describes a process of forming prediction modeinformation, more specifically, with reference to FIG. 53. FIG. 53 is aflowchart specifically showing the process of generating prediction modeinformation.

Initially, the reference position determining section 668 estimatescorrelations between the target sub block and adjacent sub blocks (A, B,C, D) based on pieces of prediction mode information of a plurality ofdecoded sub blocks positioned around the target sub block (Step S260).The pieces of prediction mode information are supplied from the storingsection 667. The reference position determining section 668 thendetermines a reference sub block to be used for estimating predictionmode information of the target sub block from the adjacent sub blocks A,B, C, and D, based on the correlations thus found in Step S260. Thereference position determining section 668 supplies reference positioninformation indicative of a position of the determined reference subblock, to the information estimating section 669 (Step S261).

The prediction mode information estimating section 669 obtains, from thestoring section 667, prediction mode information of the reference subblock indicated by the received reference position information (StepS262). The prediction mode information estimating section 669 thendetermines an estimation value of prediction mode information for thetarget sub block based on the obtained prediction mode information ofthe reference sub block. The determined estimation value is thensupplied to the relative prediction mode information generation section670 (Step S263).

The relative prediction mode information generation section 670 receivesrelative prediction mode information of the target sub block and theestimation value of prediction mode information, and generatesprediction mode information of the target sub block based on therelative prediction mode information and the estimation value. Therelative prediction mode information generation section 670 then outputsthe prediction mode information thus formed (Step S264).

Finally, the storing section stores the prediction mode information ofthe target sub block therein (Step S265).

(Modified Example)

The following deals with an image decoding device including a predictionmode information forming section 666 b, as a modified example. Theprediction mode information forming section 666 b determines a referencesub block with the use of locally decoded images of adjacent sub blocksthat have been already decoded, instead of using pieces of predictionmode information of the adjacent sub blocks.

The prediction mode information forming section 666 b in Embodiment 8exemplifies a case where a reference sub block to be used for estimatinga prediction mode of a target sub block is determined based on pieces ofprediction mode information of adjacent sub blocks that have beenalready decoded.

(Arrangement of Image Decoding Device 650 b)

An arrangement of an image encoding device 650 b employing theprediction mode information forming section 666 b is described belowwith reference to FIG. 54. FIG. 54 is a block diagram showing thearrangement of the image decoding device 650 b.

As shown in FIG. 54, the image decoding device 650 b mainly includes anentropy decoding section 305, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, an intra prediction section 310, and a predictionmode information forming section 666 b. The present embodiment describesonly the prediction mode information forming section 666 b as below.

(Prediction Mode Information Forming Section 666 b)

The prediction mode information forming section 666 b carries out aprocess reverse to the process carried out by the relative predictionmode information forming section 661 b included in the image encodingdevice 600 b described as the modified example of Embodiment 7. Morespecifically, the prediction mode information forming section 666 bforms prediction mode information of a target sub block to be decoded,based on entropy-decoded relative prediction mode information of thetarget sub block and locally decoded images, store in the memory 9, ofdecoded sub blocks adjacent to the target sub block.

An arrangement of the prediction mode information forming section 666 bis explained as below. FIG. 55 is a block diagram showing thearrangement of the prediction mode information forming section 666 b. Asshown in FIG. 55, the prediction mode information forming section 666 bincludes a storing section 667, a reference position determining section668 b, a prediction mode information estimating section 669, and aprediction mode information generation section 670. The presentembodiment describes only the reference position determining section 668b as follows.

(Reference Position Determining Section 668 b)

The reference position determining section 668 b has a function similarto the reference position determining section 663 b in the relativeprediction mode information forming section 661 b included in the imageencoding device 600 b. More specifically, the reference positiondetermining section 668 b determines a reference sub block from 4 subblocks (adjacent sub blocks A, B, C, D in FIG. 44) adjacent to thetarget sub block, by use of locally decoded images of decoded sub blockspositioned around the target sub block. The reference positiondetermining section 668 b then supplies reference position informationindicative of a position of the determined reference sub block to theprediction mode information estimating section 669. How to determine thereference sub block is the same as in the reference position determiningsection 663 b in Embodiment 7, and therefore is not explained here.

(Overview of Image Decoding Process)

An image decoding process in the image decoding device 650 b is almostthe same as the image decoding process in the image decoding device 650,except for Step S252. Therefore, the same steps as in the image decodingprocess in the image decoding device 650 are not explained here. Thefollowing deals with only Step S252 in the image decoding process in theimage decoding device 650 b, which differs from Step S252 in the imagedecoding process in the image decoding device 650.

The prediction mode information forming section 666 b receives relativeprediction mode information of a target sub block to be decoded andlocally decoded images, stored in the memory 9, of decoded sub blockspositioned around the target sub block, and forms prediction modeinformation of the target sub block, based on the relative predictionmode information and the locally decoded images (Step S252).

(Details of Process of Forming Prediction Mode Information)

A process of forming prediction mode information is almost the same asthe operation process of the relative prediction mode informationforming section 661, except for Step S241. Therefore, the same steps asin the operation process of the relative prediction mode informationforming section 661 are not explained here. The following deals withonly Step S241 in the process of forming prediction mode information inthe modified example, which differs from S241 in the operation processof the relative prediction mode information section 661.

The reference position determining section 668 b calculates edgeinformation from decodes, stored in the memory 9, of a plurality ofdecoded sub blocks positioned around the target sub block, and estimatescorrelations between the target sub block and adjacent sub blocks (A, B,C, D) (Step S241).

(Additional Matters)

In the present embodiment and the modified example of the presentembodiment, a selection unit of a sub block position to be used forestimation of a prediction mode is a sub block unit. However theselection unit is not limited to this. For example, the selection unitof the sub block position may be a macro block, a slice, a picture(frame) or a GOP (Group Of Picture). The selection unit of the sub blockposition to be used for estimation of a prediction mode may bepredetermined between an image encoding device and an image decodingdevice, or may be designated at a headmost piece of encoded data, apicture, or a GOP header. Alternatively, it is also possible to notifythe selection unit by use of external means, not by the image encodingdevice and the image decoding device. Further, in the present embodimentand the modified example thereof, the adjacent sub blocks used forestimation of a prediction mode are the adjacent sub blocks A, B, C, andD in FIG. 44, but are not limited to these. For example, the adjacentsub blocks to be used for estimation of a prediction mode may be onlysub blocks A and B, or decoded sub blocks adjacent to the target subblock in addition to the sub blocks A, B, C, and D.

(Effects)

As described above, the image decoding device 650 according to thepresent embodiment includes at least one prediction set including aplurality of prediction modes corresponding to respective predictiondirections different from each other.

The image decoding device 650 estimates correlations between a targetsub block to be decoded and adjacent sub blocks, by a predeterminedmethod, from pieces of prediction mode information of decoded adjacentsub blocks or decoded images of decoded adjacent sub blocks. Theestimation is carried out per sub block into which a target block to bedecoded, constituting an image, is subdivided. The image decoding device650 then selects a decoded sub block that is most correlated with thetarget sub block, based on the result of the estimated correlations,estimates a prediction mode of the target sub block from a predictionmode of the decoded sub block thus selected, and decodes prediction modeinformation of the target sub block based on the estimation result andrelative prediction mode information.

Since the image decoding device 650 can select a sub block that is mostcorrelated to the target sub block as such, accuracy in estimatingprediction mode information of the target sub block can be improved andan encoded amount of the prediction mode, which is to be decoded can bereduced.

[Embodiment 9]

Another embodiment of the image encoding device according to the presentinvention is explained below as Embodiment 9 with reference to FIG. 56through FIG. 60. The same constituent components as in Embodiments 1through 8 have the same reference sings as in Embodiments 1 through 8,and therefore are not explained here.

The image encoding device 100 according to Embodiment 1 exemplifies acase where one prediction set to be applied to a target block (M×M pixelblock) to be encoded is determined from one predetermined prediction setgroup (for example, Table 2). The present embodiment deals with an imageencoding device that selects one prediction set group from a pluralityof predetermined prediction set groups per block unit by use ofinformation of an encoded adjacent block (for example, predictiondirections in intra predictions that are applied to sub blocks in theencoded adjacent block), and then determines one prediction set to beapplied to a target block to be encoded from the selected prediction setgroup.

(Arrangement of Image Encoding Device 700)

An arrangement of an image encoding device 700 according to the presentembodiment is explained below with reference to FIG. 56. FIG. 56 is ablock diagram showing the arrangement of the image encoding device 700according to the present embodiment.

The image encoding device 700 includes a difference computing section 1,an orthogonal transformation section 2, a quantization section 3, anentropy encoding section 4, an inverse quantization section 6, aninverse orthogonal transformation section 7, an addition computingsection 8, a memory 9, a prediction set group selecting section 15, anintra prediction section 710, an encode parameter determining section714, and a relative prediction set information forming section 751. Thefollowing deals with the prediction set group selecting section 15, theintra prediction section 710, the encode parameter determining section714, and the relative prediction set information forming section 751.

(Prediction Set Group Selecting Section 15)

The prediction set group selecting section 15 selects a prediction setgroup to be applied to a target block to be encoded, from a plurality ofpredetermined prediction set groups, based on prediction set informationof an encoded adjacent block and pieces of prediction mode informationof all sub blocks in the encoded adjacent block. The prediction setgroup selecting section 15 outputs prediction set group informationindicative of the selected prediction set group.

The prediction set group selecting section 15 receives the predictionset information of the encoded adjacent block and the pieces ofprediction mode information of all the sub blocks in the encodedadjacent block from the encode parameter determining section 714, andstores these pieces of information therein.

(Intra Prediction Section 710)

The intra prediction section 710 carries out intra prediction defined bythe prediction set group information, prediction set information, andprediction mode information, by use of a locally decoded image ofencoded adjacent sub blocks, stored in the memory 9, and generates apredicted image. How to generate the predicted image is the same as theintra prediction section 10, and therefore is not explained here.

(Encode Parameter Determining Section 714)

The encode parameter determining section 714 receives an original imageof the target block to be encoded, the locally decoded image, stored inthe memory 9, of the encoded adjacent block, and the prediction setgroup information selected by the prediction set group selecting section15. The encode parameter determining section 714 then determines encodeparameters, such as a prediction set to be applied to the target blockto be encoded and a prediction mode to be applied to each of the subblocks in the target block to be encoded. The determined prediction setis supplied to the intra prediction section 710, the relative predictionset information forming section 751, and the prediction set groupselecting section 15. Further, the prediction mode of each of the subblocks is supplied to the prediction set group selecting section 15, theintra prediction section 710, and the entropy encoding section 4.

More specifically, the encode parameter determining section 714determines a prediction set to be applied to the target sub block, fromthe prediction set group indicated by the prediction set groupinformation selected by the prediction set group selecting section 15,and also determines a prediction mode of each of the sub blocks in thetarget sub block. For determination of the prediction set and theprediction mode, it is preferable to use the rate distortionoptimization method, similarly to the encode parameter determiningsection 14.

(Relative Prediction Set Information Forming Section 751)

The relative prediction set information forming section 751 formsrelative prediction set information from the prediction set informationreceived from the encoded parameter determining section 714, based onthe prediction set group information received from the prediction setgroup selecting section 15 and prediction set information, of an encodedadjacent block, stored inside the relative prediction set informationforming section 751. The relative prediction set information formingsection 751 then outputs the relative prediction set information.

The relative prediction set information forming section 751 mainlyincludes a storing section 752 a, a storing section 752 b, a predictionset information predicting section 753, and a relative prediction setinformation generation section 754, as shown in FIG. 57. FIG. 57 is ablock diagram showing an arrangement of the relative prediction setinformation forming section 751. Each of the members is explained below.

(Storing Sections 752 a, 752 b)

The storing sections 752 a and 752 b temporarily store input informationtherein. The storing section 752 a stores receives prediction setinformation of the target block and stores it therein. The storingsection 752 b receives prediction set group information of the targetblock from the prediction set group selecting section 15, and stores ittherein. The prediction set information and prediction set groupinformation thus stored are used for predicting a prediction set of asubsequent block that will be encoded after the target block is encoded.

(Prediction Set Information Predicting Section 753)

The prediction set information predicting section 753 determines aprediction value of a prediction set, to be applied to the target blockto be encoded, by a predetermined method, based on (a) the receivedprediction set group information of the target block and (b) predictionset group information and prediction set information, each of an encodedadjacent block, respectively stored in the storing section 752 a and thestoring section 752 b. The prediction set information predicting section753 then supplies the determined prediction value to the relativeprediction set information generation section 754.

(Relative Prediction Set Information Generation Section 754)

The relative prediction set information generation section 754 has thesame function as the relative prediction set information generationsection 511 in Embodiment 1. More specifically, the relative predictionset information forming section 754 generates relative prediction setinformation based on the received prediction set information of thetarget block and the prediction value of a prediction set, determined bythe prediction set information predicting section 753. The relativeprediction set information generation section 754 then outputs therelative prediction set information thus generated.

(Overview of Image Encoding Process)

An image encoding process in the image encoding device 700 is generallydescribed below with reference to FIG. 58. FIG. 58 is a flowchartschematically showing the image encoding process in the image encodingdevice 700.

The image encoding device 700 receives a target block to be encoded(Step S270).

The prediction set group selecting section 15 selects a prediction setgroup to be applied to the target block to be encoded, based onprediction set information of an encoded adjacent block and pieces ofprediction mode information of respective sub blocks in the encodedadjacent block (Step S271). The prediction set group selecting section15 then supplies prediction set group information on the selectedprediction group to the encode parameter determining section 714, therelative prediction set information forming section 751, and the intraprediction section 710.

The encode parameter determining section 714 determines a prediction setof the target block to be encoded and prediction modes of all sub blocksin the target block to be encoded, with the use of an original image ofthe target block to be encoded, a locally decoded image stored in thememory 9, and the prediction set group information thus selected by theprediction set group selecting section 15 (Step S272). The determinedprediction set is supplied to the intra prediction section 710, therelative prediction set information forming section 751, and theprediction set group selecting section 15. Further, the determinedprediction modes of all the sub blocks are supplied to the intraprediction section 710 and the prediction set group selecting section15.

The relative prediction set information forming section 751 formsrelative prediction set information from the prediction set groupinformation received in Step S271 and the prediction set informationreceived in Step S272, based on prediction set group information andprediction set information each of an encoded adjacent block, and thensupplies the relative prediction set information to the entropy encodingsection 4 (Step S273).

The entropy encoding section 4 carries out entropy encoding with respectto the relative prediction set information formed in Step S273 andoutputs encoded data thereof (Step S274). Further, the entropy encodingsection 4 carries out entropy encoding with respect to prediction modeinformation of a target sub block to be encoded, determined in StepS272, and outputs encoded data of the prediction mode information (StepS275).

The intra prediction section 710 carries out intra prediction defined bythe prediction set group selected in Step S271 and the prediction setand prediction mode determined in Step S272, with the use of the locallydecoded image, stored in the memory 9, of the encoded adjacent subblock, and generates a predicted image of the target sub block to beencoded (Step S276). The generated predicted image of the target subblock to be encoded is then supplied to the difference computing section1 and the addition computing section 8.

The difference computing section 1 calculates prediction residual dataof the target sub block to be encoded, which is a difference between theinputted original image of the target sub block to be encoded and thepredicted image thus generated in Step S276, and outputs the predictionresidual data (Step S277).

The prediction residual data calculated in Step S277 is supplied to theorthogonal transformation section 2 and then to the quantization section3 so as to be subjected to orthogonal transformation and toquantization, respectively. Subsequently, the prediction residual datais supplied to the entropy encoding section 4 and the inversequantization section 6 (Step S278).

The prediction residual data thus subjected to the orthogonaltransformation and the quantization is supplied to the inversequantization section 6 and then to the inverse orthogonal transformationsection 7 so as to be subjected to inverse quantization and inverseorthogonal transformation, respectively. The prediction residual data isthen supplied to the addition computing section 8 (Step S279).

The addition computing section 8 adds the prediction residual data thussubjected to the inverse quantization and the inverse orthogonaltransformation in Step S279, to the predicted image generated in StepS276, so as to generate a locally decoded image of the target sub blockto be encoded (Step S280). The locally decoded image thus generated isthen stored in the memory 9.

The entropy encoding section 4 carries out entropy encoding with respectto the quantized prediction residual data of the target sub block, andoutputs encoded data of the prediction residual data (Step S281).

The processes from Step S275 to Step S281 are carried out with respectto all sub blocks constituting the target block to be encoded. Further,the processes from Step S270 to Step S281 are carried out with respectto all blocks constituting a target image to be encoded.

The present embodiment described the image encoding process in the imageencoding device 700 in the order from Step S270 to Step S281. However,the order of the image encoding process is not limited to this, and canbe altered within a range in which the present invention can be carriedout.

(Arrangement of Prediction Set Group)

A concrete example of an arrangement of the prediction set groupemployed in the present embodiment is shown in Table 32 through Table34, by taking, as an example, a case where the number of prediction setgroups is 3.

Table 32 shows a first prediction group including a prediction set 0 (aconventional prediction set) employed in the conventional technique, aprediction set 1 (a first horizontal direction prediction set) thatfocuses on predictions in a horizontal direction, and a prediction set 2(a first vertical direction prediction set) that focuses on predictionsin a vertical direction. The first prediction set group preferablyincludes both of the prediction set that focuses on predictions in thehorizontal direction and the prediction set that focuses on the verticaldirection.

Table 33 shows a second prediction set group including a prediction setgroup that is the conventional prediction set 0, a prediction set 1 thatis the first horizontal direction prediction set, and a prediction set 2(a second horizontal direction prediction set) that that focuses onpredictions in the horizontal direction which predictions differ fromthose in the first horizontal prediction set.

Table 34 shows a third prediction set group including a prediction set 0that is the conventional prediction set, a prediction set 1 that is thefirst vertical direction prediction set, and a prediction set 2 (asecond vertical direction prediction set) that focuses on predictions inthe vertical direction which predictions differ from those in the firstvertical direction prediction set.

TABLE 32 Prediction Set 0 1 2 Prediction Mode 0 −90 −90 −90 1 0 0 0 2 DCDC DC 3 −45 −15 −75 4 45 15 75 5 67.5 −30 −60 6 22.5 30 60 7 −67.5 −60−30 8 −22.5 60 30

TABLE 33 Prediction Set 0 1 2 Prediction Mode 0 −90 −90 −90 1 0 0 0 2 DCDC DC 3 −45 −15 −10 4 45 15 10 5 67.5 −30 −20 6 22.5 30 20 7 −67.5 −60−40 8 −22.5 60 40

TABLE 34 Prediction Set 0 1 2 Prediction Mode 0 −90 −90 −90 1 0 0 0 2 DCDC DC 3 −45 −75 −80 4 45 75 80 5 67.5 −60 −70 6 22.5 60 70 7 −67.5 −30−50 8 −22.5 30 50

Among the first through third prediction set groups, a prediction setgroup to be applied to the target block to be encoded is determined fromintra predictions that are applied to all sub blocks within (a) encodedblocks 60 a and 60 c each adjacent to the target block 61, (b) encodedblocks 60 a through 60 d, (c) encoded blocks 60 a through 60 e and anencoded block 60 h, or (d) encoded blocks 60 a through 60 k, in FIG. 9.The prediction set group is determined by use of the following indices(1) through (6):

-   (1) Appearance frequency Nh (≧0) of a prediction direction θ (−45    [deg]<θ≦45 [deg]) in the horizontal direction;-   (2) Appearance frequency Nv (≧0) of a prediction direction θ (−90    [deg]≦θ≦−45 [deg], 45 [deg]<θ<90 [deg]) in the vertical direction;-   (3) A total value Nmax of Nh and Nv (Nmax=Nh+Nv);-   (4) A predetermined threshold T0;-   (5) A predetermined threshold T1; and-   (6) A predetermined threshold T2.

That is, the prediction set group to be applied to the target block tobe encoded is calculated according to the following inequations (44)through (47).

Math. 23N _(max) <T ₀  (44)0≦N _(h) <T ₁  (45)T ₁ ≦N _(h) ≦T ₂  (46)T ₂ <N _(h) ≦N _(max)  (47)

More specifically, the prediction set group is determined based on thefollowings.

(1) If the inequation (44) is satisfied, the prediction set group to beapplied to the target block to be encoded is the first prediction setgroup.

(2) If the inequation (44) is not satisfied, the prediction set group isdetermined according to the followings:

-   (2-a) if the inequation (45) is satisfied, it is determined that    prediction directions in the horizontal direction will appear more    frequently than prediction directions in the vertical direction in    the target block to be encoded. Therefore, the second prediction set    group is applied to the target block to be encoded;-   (2-b) if the inequation (46) is satisfied, it is determined that the    appearance frequency of a prediction direction in the horizontal    direction and the appearance frequency of a prediction direction in    the vertical direction will be comparable with each other.    Therefore, the first prediction set group is applied to the target    block to be encoded; or-   (2-c) if the inequation (47) is satisfied, it is determined that    prediction directions in the vertical direction will appear more    frequently than prediction directions in the horizontal direction in    the target block to be encoded. Therefore, the third prediction set    group is applied to the target block to be encoded.

The threshold T1 and the threshold T2 may be set such that T1=Nmax/3 andT2=2Nmax/3. The threshold T0 is a predetermined value determinedaccording to the number of sub blocks in encoded adjacent blocks thatare referable.

(Operation Process of Selecting Prediction Set Group)

The following describes an operation process of the prediction set groupselecting section 15 at a time of selecting a prediction set group, withreference to FIG. 59. FIG. 59 is a flowchart showing how the predictionset group selecting section 15 operates at a time of selecting aprediction set group.

The prediction set group selecting section 15 determines whether or notthere is a referable block in encoded blocks adjacent to a target blockto be encoded (Step S290). If there is no referable block (No in StepS290), the prediction set group to be applied to the target block is setto the first prediction set group. The prediction set group selectingsection 15 then outputs prediction set group information indicating the“first prediction set group”, and completes its operation (Step S291).

If there is a referable block (Yes in Step S290), the prediction setgroup selecting section 15 calculates parameters Nh, Nv, Nmax, T1, andT2 based on all pieces o prediction set information and all pieces ofprediction mode information in the referable encoded adjacent block(Step S292). The prediction set group selecting section 15 thendetermines a prediction set group to be applied to the target block tobe encoded, with the use of the Nh, Nv, Nmax, T1, and T2 thus calculatedin Step S292. More specifically, the prediction set group selectingsection 15 determines whether the inequation (44) is satisfied or not(Step S293).

If the inequation (44) is satisfied (Yes in Step S293), the firstprediction set group is set as the prediction set group to be applied tothe target block to be encoded. The prediction set group selectingsection 15 then outputs prediction set group information indicative ofthe “first prediction set group”, and completes its operation (StepS294).

If the inequation (44) is not satisfied (No in Step S293), it isdetermined whether the inequation (45) is satisfied or not (Step S295).

If the inequation (45) is satisfied (Yes in Step S295), the secondprediction set group is set as the prediction set group to be applied tothe target block to be encoded. Accordingly, the prediction set groupselecting section 15 outputs prediction set group information indicativeof the “second prediction set group”, and completes its operation (StepS296).

If the inequation (45) is not satisfied (No in Step S295), it is furtherdetermined whether the inequation (46) is satisfied or not (Step S297).

If the inequation (46) is satisfied (Yes in Step S297), the firstprediction set group is set as the prediction set group to be applied tothe target block to be encoded. Accordingly, the prediction set groupselecting section 15 outputs prediction set group information indicativeof the “first prediction set group”, and completes its operation (StepS298).

If the inequation (46) is not satisfied (No in Step S297), it isdetermined that the inequation (47) is satisfied, and the thirdprediction set group is set as the prediction set group to be applied tothe target block to be encoded. Accordingly, the prediction set groupselecting section 15 outputs prediction set group information indicativeof the “third prediction set group”, and completes its operation (StepS299).

The prediction set group selecting section 15 then stores the predictionset group information to be outputted, in a memory provided therein.Further, the operation process of the prediction set group selectingsection 15 at a time of selecting a prediction set group is explained inthe order from Step S290 to Step S299. However, the order of theoperation process is not limited to this order, and can be alteredwithin a range in which the present invention can be carried out.

With the arrangement, the prediction set group selecting section 15 canautomatically determine a prediction set group to be applied to thetarget block to be encoded, based on information of encoded adjacentblocks positioned around the target block to be encoded.

For example, if the prediction directions in the horizontal directionappear more frequently than the prediction directions in the verticaldirection in encoded adjacent blocks, a prediction set group including aplurality of prediction sets that focus on predictions in the horizontaldirection is applied to the target block to be encoded. Further, if theprediction directions in the vertical direction appear more frequentlythan the prediction directions in the horizontal direction in theencoded adjacent blocks, a prediction set group including a plurality ofprediction sets that focus on predictions in the vertical direction isapplied to the target block to be encoded. Moreover, if the predictiondirections in the horizontal direction and the prediction directions inthe vertical directions appear equally likely, then a prediction setgroup in which prediction sets that focus on the horizontal directionand prediction sets that focus on the vertical direction are evenlyincluded is selected.

As a result, it is possible to efficiently encode the target block byuse of a prediction set group including prediction sets more suitable topredicting an image of the target block.

Furthermore, the prediction set group selecting section 15 is applicableto an image decoding device, similarly. In this case, it is possible toautomatically determine a prediction set group to be applied to a targetblock to be decoded, based on information of decoded adjacent blocks.

(Details of how to Determine Prediction Value of Prediction Set)

The following describes how to determine a prediction value of aprediction set, more specifically.

Initially, the prediction value of a prediction set is temporarilydetermined by any of the following methods (1) through (3).

-   (1) A prediction set that appears most among prediction sets applied    to blocks (60 a through 60 k) positioned in the vicinity of the    target block 61 to be encoded, in FIG. 9, is set as the prediction    value.-   (2) A prediction set applied to an encoded block (60 a) positioned    on the left of the target block 61 to be encoded, in FIG. 9, is set    as the prediction value.-   (3) A prediction set applied to an encoded block (60 c) positioned    on the upper side of the target block 61 to be encoded, in FIG. 9,    is set as the prediction value.

The determined prediction value of a prediction set for the target blockto be encoded indicates “a ‘prediction set i’ in an ‘ith prediction setgroup’”.

Subsequently, the “ith prediction set group” indicated by the determinedprediction value of a prediction set for the target block is compared toa “kth prediction set group” indicated by the prediction set groupinformation of the target block to be encoded. If the “ith predictionset group” indicated by the prediction value is identical with the “kthprediction set group” of the target block to be encoded, the determinedprediction value is supplied to the relative prediction set informationgeneration section 754.

In the other cases, it is found out “which prediction set in theprediction set group to be applied to the target block to be encodedcorresponds to the determined prediction value of a prediction set”, byuse of the after-mentioned prediction set correspondence table. Then, acorresponding prediction set is determined as a prediction value. Theprediction value thus determined is supplied to the relative predictionset information generation section 754.

Exemplary prediction set correspondence tables of the first predictionset group, the second prediction set group, and the third prediction setgroup, respectively shown in Tables 32, 33, and 34 are shown in Tables35, 36, and 37, respectively.

A prediction set correspondence table shown in Table 35 showscorresponding prediction sets in the second and third prediction setgroups that are approximate to respective prediction sets in the firstprediction set group. A prediction set correspondence table shown inTable 36 shows corresponding prediction sets in the first and thirdprediction set groups that are approximated to respective predictionsets in the second prediction set group. Further, a prediction setcorrespondence table shown in Table 37 shows corresponding predictionsets in the first and second prediction set groups that are approximatedto respective prediction sets in the third prediction set group. Morespecifically, in Table 35, a prediction set 1 in the first predictionset group is most approximate to a prediction set 1 in the secondprediction set group and a prediction set in the third prediction group.It is preferable to set in advance the prediction set correspondencetables by a predetermined method.

TABLE 35 First Prediction Second Prediction Third Prediction Set GroupSet Group Set Group Prediction Set 0 0 0 1 1 0 2 0 2

TABLE 36 Second Prediction First Prediction Third Prediction Set GroupSet Group Set Group Prediction Set 0 0 0 1 1 0 2 1 0

TABLE 37 Third Prediction First Prediction Second Prediction Set GroupSet Group Set Group Prediction Set 0 0 0 1 2 0 2 2 0

(Operation Process of Relative Prediction Set Information FormingSection 751)

How the relative prediction set information forming section 751 operatesis described below with reference to FIG. 60. FIG. 60 is a flowchartshowing how the relative prediction set information forming section 751operates.

Initially, the storing section 752 a and the storing section 752 breceive and then store, respectively, prediction set information andprediction set group information the target block to be encoded (StepS300).

The prediction set information predicting section 753 calculates aprediction value of a prediction set for the target block to be encoded,from prediction set group information and prediction set informationeach of an encoded adjacent block (Step S301). The prediction setinformation predicting section 753 then determines whether or not theprediction value calculated in Step S301 is modified based on theprediction set group of the target block to be encoded (Step S302).

If the prediction value is not modified (No in Step S302), theprediction set information predicting section 753 supplies theprediction value to the relative prediction set information generationsection 754. If the prediction value is modified (Yes in Step S302), theprediction set information predicting section 753 modifies theprediction value calculated in Step S301 and then supplies the modifiedprediction value to the relative prediction set information generationsection 754 (Step S303).

The relative prediction set information generation section 754 generatesrelative prediction set information based on the prediction setinformation of the target block to be encoded and the prediction valuesupplied from the prediction set information predicting section 753. Therelative prediction set information generation section 754 then outputsthe relative prediction set information (Step S304).

As described above, if a prediction set of the target block to beencoded and a prediction value of a prediction set for the target blockto be encoded, which prediction value is determined by a predeterminedmethod, belong to different prediction set groups, the prediction setinformation predicting section 753 converts the prediction value into acorresponding prediction set in the prediction set group of the targetblock to be encoded, according to the aforementioned prediction setcorrespondence table. This results in that accuracy in predicting aprediction set can be improved and an encoding amount necessary for theprediction set can be reduced.

(Additional Matters)

The present embodiment dealt with a case where an exemplary arrangementof each predetermined prediction set group (the first prediction setgroup, the second prediction set group, the third prediction set group)is such that the number L of prediction sets is 3, the number Ki ofprediction modes is 9 (i=0, 1, 2). However, the arrangement is notlimited to this. For example, each of the prediction set groups may besuch that the number L of prediction sets may be 5 or 9, or an anothernatural number. Further, the numbers of prediction sets in therespective prediction set groups may be different from each other.However, in the case where the arrangements of the prediction set groupare set differently from each other, it is necessary to definerespective prediction set correspondence tables, accordingly.

Further, the prediction set group selecting section 15 in the presentembodiment selects a prediction set group based on prediction directionsin intra predictions of all sub blocks in encoded adjacent blocks.However, how to select a prediction set group is not limited to theabove manner. For example, a prediction set group may be selected basedon prediction sets of encoded adjacent blocks around the target block tobe encoded. In this case, if the appearance frequency of horizontaldirection prediction sets is high, the second prediction set group isselected. If the appearance frequency of vertical direction predictionsets is high, the third prediction set group is selected. Further, ifthe horizontal direction prediction sets and the vertical directionprediction sets appear equally likely, the first prediction set group isselected. Further, a prediction set group may be selected in such amanner that an edge orientation is calculated according to decodedimages around the target block to be encoded and a prediction set groupmay be selected based on the calculated edge orientation.

In the present embodiment, a unit of changing a prediction set group isan M×M pixel block. However, the unit of changing a prediction set groupis not limited to this. For example, the unit of changing a predictionset group may be a macro block, a slice, a picture (frame), or a GOP(Group of Picture). Further, the unit of changing a prediction set groupmay be predetermined between an image encoding device and an imagedecoding device. Alternatively, it is also possible to notify the unitby use of external means, not by the image encoding device and the imagedecoding device.

(Effects)

As described above, the image encoding device 700 calculates appearancefrequency of a prediction direction in intra prediction in an adjacentblock that has been already encoded, with respect to each blockconstituting an image. For example, as the frequency of a predictiondirection, the appearance frequency of a prediction direction in ahorizontal direction and the appearance frequency of a predictiondirection in a vertical direction are calculated.

The image encoding device includes a plurality of prediction set groupseach including a plurality of prediction sets having differentcombinations of a plurality of prediction modes corresponding torespective prediction directions different from each other. The imageencoding device selects a prediction set group suited for tendency ofthe appearance frequency of a prediction direction in intra predictionin an encoded adjacent block. For example, if the appearance frequencyof a prediction direction in the horizontal direction is high, aprediction set group defining mainly prediction sets that focus onpredictions in the horizontal direction is selected. Further, if theappearance frequency of a prediction direction in the vertical directionis high, a prediction group defining mainly prediction sets that focuson predictions in the vertical direction is selected. Furthermore, ifthe appearance frequency in the horizontal direction and the appearancefrequency in the vertical direction are comparable with each other, aprediction set group in which prediction sets that focus on predictionsin the horizontal direction and prediction sets that focus onpredictions in the vertical direction are evenly defined is selected.

Subsequently, a prediction set suitable to the target block to beencoded is selected from the selected prediction set group. The targetblock is then encoded with the use of the selected prediction set.

As such, the image encoding device 700 encodes an image with the use ofa prediction set optimal to characteristics of the image. Thearrangement allows the image encoding device 700 to carry out predictionfrom more various angles than the conventional technique, therebyreducing an encoding amount of the image and improving image quality.

Further, the image encoding device 700 expresses a prediction method ina hierarchical manner with prediction set information and predictionmode information, thereby allowing more flexibly selecting a predictionmethod. As a result, it is possible to improve efficiency in predictionwhile preventing that an encoding amount necessary for the predictionmethod increases.

Moreover, if a prediction set group indicated by a prediction set of thetarget block to be encoded is different from a prediction set groupindicated by a prediction value of a prediction set for the target blockwhich prediction value is calculated by a predetermined method, theimage encoding device 700 converts the prediction value into aprediction set of the prediction set group of the target block accordingto the aforementioned prediction set correspondence table. This allowsimproving accuracy in predicting a prediction set and reducing anencoding amount necessary for the prediction set.

[Embodiment 10]

Another embodiment of the image decoding device according to the presentinvention is described below as Embodiment 10 with reference to FIG. 61through FIG. 64.

An image decoding device 150 according to Embodiment 2 exemplifies acase where one prediction set to be applied to a target block (M×M pixelblock) to be decoded is determined, from one predetermined predictionset group (for example, Table 2) based on prediction set informationthat has been already decoded. The present embodiment deals with animage decoding device that selects one prediction set group, per blockunit, from a plurality of predetermined prediction set groups with theuse of information on a decoded adjacent block (for example, predictiondirections of intra predictions, used for sub blocks included in thedecoded adjacent blocks), and then determines one prediction set to beapplied to the target block to be decoded from the selected predictionset group, based on decoded prediction set information.

(Arrangement of Image Decoding Device 750)

An arrangement of an image decoding device according to the presentembodiment is described below with reference to FIG. 61. FIG. 61 is ablock diagram showing an arrangement of an image decoding device 750.The image decoding device 750 mainly includes an entropy decodingsection 5, an inverse quantization section 6, an inverse orthogonaltransformation section 7, an addition computing section 8, a memory 9, aprediction set group selecting section 15, an intra prediction section710, and a prediction set information forming section 755, as shown inFIG. 61. The present embodiment describes only the prediction setinformation forming section 755, which has not been described yet.

(Prediction Set Information Forming Section 755)

The prediction set information forming section 755 forms prediction setinformation of a target block to be decoded, based on (a) relativeprediction set information of the target block to be decoded, receivedfrom the entropy decoding section 5, (b) prediction set groupinformation of the target block to be decoded, received from theprediction set group selecting section 15, and (c) prediction set groupinformation and prediction set information of a decoded adjacent block,stored inside the prediction set information forming section 755.

An arrangement of the prediction set information forming section 755 isdescribed below with reference to FIG. 62. FIG. 62 is a block diagramshowing the arrangement of the prediction set information formingsection 755. As shown in FIG. 62, the prediction set information formingsection 755 includes a storing section 756 a, a storing section 756 b, aprediction set information predicting section 757, and a prediction setinformation generation section 758. Each of the members is describedbelow.

(Storing Sections 756 a, 756 b)

The storing sections 756 a and 756 b temporarily store inputinformation. The storing section 756 a receives prediction setinformation of the target block to be decoded and stores it therein.Further, the storing section 756 b receives prediction set groupinformation from the prediction set group selecting section 15, and thenstores it therein. The prediction set information and prediction setgroup information thus stored are used for predicting a prediction setof a subsequent block which will be decoded after the target block isdecoded.

(Prediction Set Information Prediction Section 757)

The prediction set information predicting section 757 determines aprediction value of a prediction set, to be applied to the target blockto be decoded, by a predetermined method on the basis of (i) thereceived prediction set group information of the target block, and (ii)prediction set group information and prediction set information of adecoded adjacent block, respectively stored in the storing sections 756a and 756 b. The prediction set information predicting section 757supplies thus determined prediction value to the prediction setinformation generation section 758.

How to determined the prediction value of a prediction set for thetarget block is the same as in the prediction set information predictingsection 753, and therefore is not explained here.

(Prediction Set Information Generation Section 758)

The prediction set information generation section 758 has the samefunction as the prediction set information generation section 521 inEmbodiment 2. That is, the prediction set information generation section758 generates prediction set information based on relative predictionset information and the prediction value of a prediction set, determinedby the prediction set information predicting section 757.

(Overview of Image Decoding Process)

An image decoding process in the image decoding device 750 is generallyexplained as below with reference to FIG. 63. FIG. 63 is a flowchartschematically showing the image decoding process in the image decodingdevice 750.

Initially, the image decoding device 750 receives encoded data of atarget block to be decoded (Step S310).

The prediction set group selecting section 15 selects a prediction setgroup to be applied to the target block to be encoded, based on aprediction set group of a decoded adjacent block and pieces ofprediction mode information of sub blocks included in the decodedadjacent block. The prediction set group selecting section 15 thensupplies prediction set group information to the prediction setinformation forming section 755 and the intra prediction section 710(Step S311).

The entropy decoding section 5 carries out entropy decoding with respectto relative prediction set information of the target block to be decodedin the received encoded data, and supplies the relative prediction setinformation to the prediction set information forming section 755 (StepS312).

The prediction set information forming section 755 forms prediction setinformation of the target block to be decoded, based on: the relativeprediction set information thus entropy-decoded in Step S312; theprediction set group information thus selected in Step S311; andprediction set group information and prediction set information of adecoded adjacent block, stored in the prediction set information formingsection 755 (Step S313). Thus formed prediction set information of thetarget block to be decoded is then supplied to the prediction set groupselecting section 15.

The entropy decoding section 5 carries out entropy decoding with respectto prediction mode information of a target sub block to be decoded. Thetarget sub block is a sub block obtained by subdividing the target blockto be decoded by a predetermined block size (N×N pixel block). Theentropy decoding section 5 supplies the entropy-decoded prediction modeinformation to the intra prediction section 710 (Step S314). Further,the entropy decoding section 5 carries out entropy decoding with respectto a quantization value of prediction residual data of the target subblock to be decoded (Step S315).

The intra prediction section 710 carries out intra prediction defined bythe prediction set group selected in Step S311, the prediction setinformation formed in Step S313, and the prediction mode informationthus entropy-decoded in Step S314, with the use of a locally decodedimage, store in the memory 9, of decoded adjacent sub blocks, so as togenerate a predicted image of the target sub block to be decoded (N×Npixel block) (Step S316).

The prediction residual data entropy-decoded in Step S315 is supplied tothe inverse quantization section 6 and then to the inverse orthogonaltransformation section 7 so as to be subjected to inverse quantizationand inverse orthogonal transformation, respectively. The predictionresidual data is then supplied to the addition computing section 8 (StepS317).

The addition computing section 8 adds the predicted image thus generatedin Step S316, to the prediction residual data thus subjected to theinverse quantization and the inverse orthogonal transformation in StepS317, so as to generate a decoded image (N×N pixel block) of the targetsub block. The addition computing section 8 then outputs the decodedimage (Step S318).

Finally, the memory 9 stores therein the decoded image of the target subblock to be decoded, generated in Step S318 (Step S319).

The image decoding device 750 carries out the processes from Step S314to Step S319 with respect to all sub blocks constituting the targetblock to be decoded. Further, the image decoding device 750 carries outthe processes from Step S310 to Step S319 with respect to all blocksconstituting a target image to be decoded.

The present embodiment described the decoding process in the imagedecoding device 750 in the order from Step S310 to Step S319. However,the order of the decoding process is not limited to this, and can bealtered within a range in which the present invention can be carriedout.

(Operation Process of Prediction Set Information Forming Section 55)

The following describes how the prediction set information formingsection 755 operates, with reference to FIG. 64. FIG. 64 is a flowchartof how the prediction set information forming section 755 operates.

Initially, the prediction set information predicting section 757calculates a prediction value of a prediction set for a target block,based on prediction set group information and prediction set informationeach of a decoded adjacent block (Step S320). Subsequently, theprediction set information predicting section 757 determines whether ornot the prediction value thus calculated in Step S320 is modified basedon a prediction set group indicated by the prediction value and aprediction set group of the target block to be decoded (Step S321).

If the prediction value is not modified (No in Step S321), theprediction set information predicting section 757 supplies theprediction value to the prediction set information generation section758. If the prediction value is modified (Yes in Step S321), theprediction set information predicting section 757 modifies theprediction value calculated in Step S320 according to a prediction setcorrespondence table, and supplies the modified prediction value to theprediction set information generation section 758 (Step S322).

The prediction set information generation section 758 generatesprediction set information based on relative prediction set informationof the target block to be decoded and the prediction value received fromthe prediction set information predicting section 757, and outputs thegenerated prediction set information (Step S323).

Finally, the storing section 756 a stores the prediction set informationof the target block to be decoded, formed in Step S323, and the storingsection 756 b stores prediction set group information of the targetblock to be decoded (Step S324).

As described above, if a prediction set indicated by the prediction setof the target block to be decoded is different from the predictionvalue, calculated by a predetermined method, for the prediction set ofthe target block to be decoded, the prediction set informationpredicting section 757 converts the prediction value into a predictionset in the prediction set group of the target block to be decoded,according to the prediction set correspondence table. This allowsimproving accuracy in predicting a prediction set and reducing anencoded amount of the prediction set, which is to be decoded.

(Additional Matters)

In the present embodiment, the prediction set group selecting section 15selects a prediction set group based on prediction directions of intrapredictions of all sub blocks included in decoded adjacent blocks.However, how to select a prediction set group is not limited to this.For example, the prediction set group selecting section 15 may select aprediction set group based on prediction sets of decoded adjacent blocksaround the target block to be decoded. In this case, if the appearancefrequency of horizontal direction prediction sets is high, the secondprediction set group is preferably selected. Meanwhile, if theappearance frequency of the vertical direction prediction sets is high,the third prediction set group is preferably selected. Moreover, if thehorizontal direction prediction sets and the vertical directionprediction sets appear evenly likely, the first prediction set group ispreferably selected. Further, a prediction set group may be selected insuch a manner that an edge orientation is calculated according todecoded images around the target block to be decoded and a predictionset group may be selected based on the calculated edge orientation.

Moreover, in the present embodiment, a unit of changing the predictionset group is an M×M pixel block. However, the unit of changing aprediction set group is not limited to this. For example, the unit ofchanging a prediction set group may be a macro block, a slice, a picture(frame), or a GOP (Group of Picture). Further, the unit of changing aprediction set group may be predetermined between an image encodingdevice and an image decoding device. Alternatively, it is also possibleto notify the unit by use of external means, not by the image encodingdevice and the image decoding device.

(Effects)

As described above, the image decoding device 750 includes a pluralityof prediction set groups each including a plurality of prediction setshaving different combinations of a plurality of prediction modescorresponding to respective prediction directions different from eachother.

The image decoding device 750 calculates appearance frequency of aprediction direction in intra prediction in an adjacent block that hasbeen already decoded, with respect to each block constituting an image.For example, as the frequency of a prediction direction, the appearancefrequency of a prediction direction in the horizontal direction and theappearance frequency of a prediction direction in the vertical directionare calculated.

The image decoding device 750 selects a prediction set group suited fortendency of the appearance frequency of a prediction direction in intraprediction in a decoded adjacent block. For example, if the appearancefrequency of a prediction direction in the horizontal direction is high,a prediction set group defining mainly prediction sets that focus onpredictions in the horizontal direction is selected. Further, if theappearance frequency of a prediction direction in the vertical directionis high, a prediction set group defining mainly prediction sets thatfocus on predictions in the vertical direction is selected. Furthermore,if the appearance frequency in the horizontal direction and theappearance frequency in the vertical direction are comparable with eachother, a prediction set group in which prediction sets that focus onpredictions in the horizontal direction and prediction sets that focuson predictions in the vertical direction are evenly defined is selected.

Subsequently, prediction set information to be applied to the targetblock to be decoded is decoded with the use of prediction set groupinformation and relative prediction set information of the target blockto be decoded, and prediction set information and prediction set groupinformation of a decoded adjacent block. The process is carried out perblock constituting an image.

Finally, the image decoding device 750 carries out intra prediction withrespect to a target sub block (into which the target block to be decodedis subdivided), with the use of a locally decoded image of a sub blockadjacent to the target sub block, so as to generate a predicted image ofthe target sub block. The image decoding device 750 then combines thegenerated predicted image and decoded prediction residual data, so as toreconstruct an image of the target sub block.

As a result, in the case where decoded prediction set informationindicates a prediction set that focuses on predictions in a horizontaldirection, it is possible to generate a predicted image from morespecified angles with the horizontal direction as a center. Further, inthe case where decoded prediction set information indicates a predictionset that focuses on predictions in a vertical direction, it is possibleto generate a predicted image from more specified angles with thevertical direction as a center. Consequently, the image decoding device750 can carry out a decoding process with the use of predictions frommore various angles than the conventional technique, thereby allowingreproducing an edge portion more efficiently. As a result, it ispossible to reconstruct an image with improved image quality.

Further, the image decoding device 750 carries out prediction at threestages of a prediction set group, a prediction set, and a predictionmode. This can realize high accuracy in prediction and prevent increasein an encoded amount.

Moreover, in the case where a prediction set group indicated by aprediction set of the target block to be encoded is different from aprediction set group indicated by a prediction value of a prediction setfor the target block which prediction value is calculated by apredetermined method, the image decoding device 750 converts theprediction value into a prediction set of the prediction set group ofthe target block according to the aforementioned prediction setcorrespondence table. This allows improving accuracy in predicting aprediction set and reducing an encoded amount of the prediction set,which is to be decoded.

(Program and Storage Medium)

Finally, the blocks of the image encoding devices 100, 200, 500, 500 b,600, 600 b, and 700, and the image decoding devices 150, 250, 550, 550b, 650, 650 b, and 750 may be realized by way of hardware or software asexecuted by a CPU as follows.

The image encoding devices 100, 200, 500, 500 b, 600, 600 b, and 700,and the image decoding devices 150, 250, 550, 550 b, 650, 650 b, and 750each include a CPU (central processing unit) and memory devices (memorymedia). The CPU (central processing unit) executes instructions incontrol programs realizing the functions. The memory devices include aROM (read only memory) which contains programs, a RAM (random accessmemory) to which the programs are loaded, and a memory containing theprograms and various data. The objective of the present invention canalso be achieved by mounting to the image encoding devices 100, 200,500, 500 b, 600, 600 b, and 700, and the image decoding devices 150,250, 550, 550 b, 650, 650 b, and 750 a computer-readable storage mediumcontaining control program code (executable program, intermediate codeprogram, or source program) for the image encoding devices 100, 200,500, 500 b, 600, 600 b, and 700, and the image decoding devices 150,250, 550, 550 b, 650, 650 b, and 750, which is software realizing theaforementioned functions, in order for the computer (or CPU, MPU) toretrieve and execute the program code contained in the storage medium.

The storage medium may be, for example, a tape, such as a magnetic tapeor a cassette tape; a magnetic disk, such as a Floppy (RegisteredTrademark) disk or a hard disk, or an optical disk, such asCD-ROM/MO/MD/DVD/CD-R; a card, such as an IC card (memory card) or anoptical card; or a semiconductor memory, such as a maskROM/EPROM/EEPROM/flash ROM.

The image encoding devices 100, 200, 500, 500 b, 600, 600 b, and 700,and the image decoding devices 150, 250, 550, 550 b, 650, 650 b, and 750may be arranged to be connectable to a communications network so thatthe program code may be delivered over the communications network. Thecommunications network is not limited in any particular manner, and maybe, for example, the Internet, an intranet, extranet, LAN, ISDN, VAN,CATV communications network, virtual dedicated network (virtual privatenetwork), telephone line network, mobile communications network, orsatellite communications network. The transfer medium which makes up thecommunications network is not limited in any particular manner, and maybe, for example, wired line, such as IEEE 1394, USB, electric powerline, cable TV line, telephone line, or ADSL line; or wireless, such asinfrared radiation (IrDA, remote control), Bluetooth (registeredtrademark), 802.11 wireless, HDR, mobile telephone network, satelliteline, or terrestrial digital network. The present invention encompassesa computer data signal which is embedded into a carrier wave and inwhich the program code is embodied electronically.

The present invention is not limited to the description of theembodiments above, but may be altered by a skilled person within thescope of the claims. An embodiment based on a proper combination oftechnical means disclosed in different embodiments is encompassed in thetechnical scope of the present invention.

(Additional Matters)

The present invention can be also described as follows.

(First Arrangement)

An image encoding device of the first arrangement is an encoding devicefor encoding an image and includes: calculating means for calculatingedge information at least on an edge orientation of an edge perconstituent image of the image; selecting means for selecting aprediction set suited for the edge information thus calculated perconstituent image, from a prediction set group including a plurality ofprediction sets having different combinations of a plurality ofprediction modes corresponding to respective prediction directionsdifferent from each other; and encoding means for carrying out encodingper constituent image by use of the prediction set thus selected perconstituent image.

In the arrangement, the image encoding device calculates edgeinformation at least on an edge orientation of an edge per constituentimage of an image to be encoded. As the edge information, an edgeorientation and/or an edge strength of a constituent image, ordistribution information thereof are/is calculated, for example. Theimage encoding device selects a prediction set suited for the calculatededge information, from a prediction set group including a plurality ofprediction sets having different combinations of a plurality ofprediction modes corresponding to respective prediction directionsdifferent from each other. The image encoding device then encodes theconstituent image by use of the selected prediction set. For example, inthe case where the edge information indicates an edge orientation in ahorizontal direction, the image encoding device encodes an image by useof a prediction set that focuses on predictions in the horizontaldirection. On the other hand, in the case where the edge informationindicates an edge orientation in a vertical direction, the imageencoding device encodes an image by use of a prediction set that focuseson predictions in the vertical direction.

As such, the image encoding device encodes an image by use of aprediction set optimal to edge information of the image. This allows theimage encoding device to carry out predictions from more specific anglesthan the conventional technique. As a result, it is possible to reducean encoding amount of prediction residual data of the image and toimprove image quality.

(Second Arrangement)

The image encoding device according to the first arrangement furtherincludes dividing means for dividing the image into blocks by apredetermined unit, and the image encoding device is arranged such thatthe calculating means calculates edge information of a target block, theselecting means selects a prediction set suited for the edge informationthus calculated, with respect to the target block, and the encodingmeans encodes information indicative of the prediction set thus selectedper block and also encodes the target block by use of the prediction setthus selected.

In the arrangement, the image encoding device carries out encoding perpredetermined unit block constituting an image. At this time, the imageencoding device uses a prediction set suited to edge information of atarget block. For example, in an image, for a target block having a lotof edges in a horizontal direction, the image encoding device encodesthe target block by use of a prediction set that focuses on predictionsin the horizontal direction. On the other hand, in the same image, foranother target block having a lot of edges in a vertical direction, theimage encoding device encodes the another target block by use of aprediction set that focuses on predictions in the vertical direction.

The arrangement can further improve image quality.

(Third Arrangement)

The image encoding device according to the second arrangement furtherinclude block-dividing means for subdividing a target block into subblocks, and the image encoding device is arranged such that the edgeinformation calculates edge information indicative of an edgeorientation per sub block in the target block, and the selecting meansselects, from the plurality of prediction sets, a prediction set havinga smallest degree of similarity between prediction directions indicatedby prediction modes in the prediction set and edge orientations of allsub blocks in the target block.

In the arrangement, the image encoding device subdivides each of theblocks constituting an image into a plurality of sub blocks. Further,the image encoding device calculates, per sub block, edge informationindicative of an edge orientation of a target sub block. That is, aplurality of edge orientations included in a target block arecalculated. Subsequently, the image encoding device selects, from theplurality of prediction sets, a prediction set having a smallest degreeof similarity between prediction directions indicated by predictionmodes in the prediction set and edge orientations of all sub blocks inthe target block.

With the above processes, the image encoding device can find aprediction set optimal for encoding the target block, from the pluralityof prediction sets. This results in that an encoding amount of an imagecan be maximally reduced and image quality can be maximally improved.

(Fourth Arrangement)

An image encoding device of the fourth arrangement is an image encodingdevice for encoding an image and includes: calculating means forcalculating edge information at least on an edge orientation of an edgeper constituent image of the image; determining means for determiningrespective prediction directions corresponding to a plurality ofprediction modes in a prediction set, based on the edge information thuscalculated per constituent image; and encoding means for carrying outencoding per constituent image by use of the prediction set thusdetermined per constituent image.

In the arrangement, the image encoding device calculates edgeinformation at least on an edge orientation of an edge of eachconstituent image of an image to be encoded. As the edge information, anedge orientation and/or an edge strength of a constituent image, ordistribution information thereof are/is calculated, for example. Theimage encoding device determines respective prediction directions of aplurality of prediction modes in a prediction set, on the basis of theedge orientation thus calculated. For example, in the case where theedge information indicates an edge orientation in a horizontaldirection, the image encoding device determines prediction directionsfocusing on predictions in the horizontal direction. Accordingly, theimage encoding device encodes an image by use of a prediction setsuitable for predictions in the horizontal direction. On the other hand,in the case where the edge information indicates an edge in a verticaldirection, the image encoding device carries out encoding by use of aprediction set that defines prediction directions focusing onpredictions in the vertical direction. Accordingly, the image encodingdevice encodes an image by use of the prediction set suitable forpredictions in the vertical direction.

As such, the image encoding device encodes an image by use of aprediction set most suited to edge information of the image. Thearrangement allows the image encoding device to carry out predictionsfrom more specific angles than the conventional technique. As a result,it is possible to further reduce an encoding amount of an image and toimprove image quality.

(Fifth Arrangement)

The image encoding device according to the fourth arrangement furtherincludes dividing means for dividing the image into blocks by apredetermined unit, and the image encoding device is arranged such thatthe calculating means calculates edge information of a target block, theselecting means determines prediction directions in a prediction set inconformity to the target block, and the encoding means encodesinformation indicative of the prediction directions in the predictionset and also encodes the target block by use of the prediction set inwhich the prediction directions are determined in conformity to thetarget block.

In the arrangement, the image encoding device carries out encoding perpredetermined unit block constituting an image. At this time, the imageencoding device uses a prediction set suited to edge information of atarget block. In an image, for a target block having a lot of edges in ahorizontal direction, the image encoding device encodes the target blockby use of a prediction set that focuses on predictions in the horizontaldirection. On the other hand, for another target block, in the sameimage, having a lot of edges in a vertical direction, the image encodingdevice encodes the another target block by use of a prediction set thatfocuses on predictions in the vertical direction.

The arrangement allows the image encoding device to further improveimage quality.

(Sixth Arrangement)

The image encoding device according to the fourth or fifth arrangementis further arranged such that the determining section calculates ahistogram indicative of a relationship between an edge orientation and acumulative probability of the edge orientation, with respect to aplurality of edge orientations included in a target block, and thendetermines a plurality of edge orientations as prediction directions ina prediction set so that differences between cumulative probabilities ofthe plurality of orientations are even in the histogram.

In the arrangement, the image encoding device calculates a histogram fora plurality of edge orientations in a target block to be encoded, whichhistogram indicates a relationship between an edge orientation and acumulative probability of the edge orientation. The image encodingdevice then finds several edge orientations whose cumulativeprobabilities are distanced at even intervals in the calculatedhistogram, and sets the several edge orientations as predictiondirections in a prediction set. With the arrangement, in the case wheremany edge orientations are in a horizontal direction in a single block,prediction directions are determined so that most of the predictiondirections are in the proximity of the horizontal direction. On theother hand, in the case where many edge orientations are in a verticaldirection in a single block, prediction directions are determines sothat most of the prediction directions are in the proximity of thevertical direction.

The arrangement allows the image encoding device to encode the block byuse of a prediction set optimized for predictions of the edgeorientations included in the block. As a result, it is possible tomaximally reduce an encoding amount of the block and to maximallyimprove image quality.

(Seventh Arrangement)

An image encoding method of the seventh arrangement is for encoding animage and includes the steps of: calculating edge information at leaston an edge orientation of an edge per constituent image of the image;selecting a prediction set suited for the edge information thuscalculated per constituent image, from a prediction set group includinga plurality of prediction sets having different combinations of aplurality of prediction modes corresponding to respective predictiondirections different from each other; and carrying out encoding perconstituent image by use of the prediction set thus selected perconstituent image.

The arrangement also successfully achieves the same advantageous effectsas the first arrangement.

(Eighth Arrangement)

An image encoding method of the eighth arrangement is a method forencoding an image and includes the steps of: calculating edgeinformation at least on an edge orientation of an edge per constituentimage of the image; determining respective prediction directionscorresponding to a plurality of prediction modes of a prediction set,based on the edge orientation thus calculated per constituent image; andcarrying out encoding per constituent image by use of the determinedprediction set thus determined per constituent image.

The arrangement also successfully achieves the same advantageous effectsas the fourth arrangement.

(Ninth Arrangement)

An image decoding device of the ninth arrangement is an image decodingdevice for decoding an image encoded by an image encoding deviceaccording to any one of the first through sixth arrangements, andincludes decoding means for decoding the image by use of a predictionset that the image encoding means used for encoding the image.

In the arrangement, the image decoding device decodes encoded data of animage by use of an encoded prediction set optimal for edge informationof the image.

As a result, the image decoding device can obtain an image with improvedimage quality.

Furthermore, the image decoding device can realize reduction in aprocessing amount of decoding prediction residual data at a time ofdecoding an encoded image.

(Tenth Arrangement)

An image decoding method of the tenth arrangement is a method fordecoding an image encoded by an image encoding method according to theseventh or eighth arrangement, and includes the step of decoding theimage by use of a prediction set used for encoding the image in theencoding step.

The arrangement also successfully achieves the same advantageous effectsas the ninth arrangement.

(Eleventh Arrangement)

A program of the eleventh arrangement operates an image encoding deviceaccording to any one of the first through sixth arrangements or an imagedecoding device according to the ninth arrangement, and causes acomputer to function as each means described above.

(Twelfth Arrangement)

A computer-readable storage medium of the twelfth arrangement is astorage medium in which a program according to the eleventh arrangementis stored.

An image encoding device of the present invention includes selectingmeans for selecting a prediction set from a prediction set groupincluding a plurality of prediction sets having different combinationsof a plurality of prediction modes corresponding to respectiveprediction directions different from each other, and encoding means forencoding an image by use of the prediction set thus selected. Thearrangement allows the image encoding device of the present invention tocarry out prediction from a more specific angle, thereby successfullyimproving efficiency in prediction and reducing an encoding amount ofprediction residual data.

An image encoding device of the present invention includes: selectingmeans for selecting a prediction mode to be applied to a target subblock from at least one prediction set including a plurality ofprediction modes corresponding to different prediction directions;encoding means for encoding an image of the target sub block by use ofthe prediction mode thus selected; selecting means for selecting anencoded adjacent sub block that is highly correlated with the target subblock, in accordance with pieces of prediction mode information ofencoded sub blocks adjacent to the target sub block or decoded images ofthe encoded sub blocks; and encoding means for encoding the predictionmode thus selected, based on prediction mode information of the encodedsub block thus selected. This makes it advantageously possible to reducean encoding amount necessary for the prediction mode.

An image decoding device of the present invention includes: decodingmeans for decoding information on a prediction set to be applied to atarget block, from a prediction set group including a plurality ofprediction sets having different combinations of a plurality ofprediction modes corresponding to different prediction directions; anddecoding means for decoding an image of the target block by use of theprediction set thus decoded. The arrangement allows the image decodingdevice to efficiently reconstruct an edge component of an image in aparticular direction, from a more specific angle, thereby advantageouslyrealizing an improvement in image quality.

An image decoding device of the present invention includes: selectingmeans for selecting a decoded adjacent sub block that is highlycorrelated with a target sub block, in accordance with pieces ofprediction mode information of decoded sub blocks adjacent to the targetsub block or decoded images of the decoded sub blocks; decoding meansfor decoding a prediction mode to be applied to the target sub blockfrom at least one prediction set including a plurality of predictionmodes corresponding to different prediction directions, based onprediction mode information of the decoded sub block thus selected; anddecoding means for decoding an image of the target sub block by use ofthe prediction mode thus decoded. The arrangement makes itadvantageously possible to reduce an encoded amount of the predictionmode, which is to be decoded.

The embodiments and concrete examples of implementation discussed in theforegoing detailed explanation serve solely to illustrate the technicaldetails of the present invention, which should not be narrowlyinterpreted within the limits of such embodiments and concrete examples,but rather may be applied in many variations within the spirit of thepresent invention, provided such variations do not exceed the scope ofthe patent claims set forth below.

Industrial Applicability

The image encoding device and the image decoding device according to thepresent invention can be applied to vide devices such as a digitaltelevision, a hard disk recorder, a DVD camera, and a mobile phone thatcan carry out image processing.

The invention claimed is:
 1. An image decoder for decoding encoded dataso as to form a decoded image, comprising: a decoding circuit configuredto decode, from the encoded data, (i) an encode parameter includingprediction mode information and (ii) prediction residual data; a firstselecting circuit configured to select, from a plurality of predictionsets, one prediction set to be used with respect to each target block tobe intra-predicted, wherein the prediction set includes , as predictionmode candidates, a plurality of prediction modes corresponding torespective direction predictions, wherein each of the plurality ofprediction sets includes the same number of the plurality of predictionmodes; a second selecting circuit configured to select one predictionmode from the plurality of prediction modes included in the predictionset selected by the first selector; a predicting circuit configured toform, on the basis of the prediction mode thus selected, a predictedimage of the each target block to be intra-predicted; and an addingcircuit configured to form a decoded image of the each target block tobe intra-predicted by adding the predicted image formed by theprediction section and the prediction residual data obtained by decodingthe encoded data.
 2. The image decoder as set forth in claim 1, whereinprediction directions of the respective plurality of prediction modescorresponding to the respective direction predictions are unevenlydistributed with a bias towards a specific direction.
 3. The imagedecoder as set forth in claim 2, wherein a plurality of prediction setsconstituting the prediction set group are selectable with respect to apredetermined reference region which is referred to by the predictor inorder to form the predicted image of the each target block to beintra-predicted.
 4. The image decoder as set forth in claim 3, whereinthe predetermined reference region includes at least one of regionswhich are positioned on the left, on the upper left, and on the top,respectively, of the each target block to be intra-predicted.
 5. Theimage decoder as set forth in claim 2, wherein the specific direction isa horizontal direction or a vertical direction.
 6. An image encoder forencoding an input image, comprising: a determining circuit configured todetermine a prediction mode to be used for forming a predicted image ofa target block to be intra-predicted; a selecting circuit configured toselect, from a plurality of prediction sets, one prediction set withrespect to each target block to be intra-predicted, wherein theprediction set includes, as prediction mode candidates, a plurality ofprediction modes corresponding to respective direction predictions,wherein each of the plurality of prediction sets includes the samenumber of the plurality of prediction modes; a prediction mode encoderconfigured to encode, with respect to the each target block to beintra-predicted and by use of the prediction set thus selected by theselector, the prediction mode thus determined; a predicting circuitconfigured to form, on the basis of the prediction mode thus determined,a predicted image of the each target block to be intra-predicted; and aresidual data encoding circuit configured to encode residual databetween the input image and the predicted image.
 7. The image encoder asset forth in claim 6, wherein prediction directions of the respectiveplurality of prediction modes corresponding to the respective directionpredictions are unevenly distributed with a bias towards a specificdirection.
 8. The image encoder as set forth in claim 7, wherein aplurality of prediction sets are selectable with respect to apredetermined reference region which is referred to by the predictor inorder to form the predicted image of the each target block to beintra-predicted.
 9. The image encoder as set forth in claim 8, whereinthe predetermined reference region includes at least one of regionswhich are positioned on the left, on the upper left, and on the top,respectively, of the each target block to be intra-predicted.
 10. Theimage encoder as set forth in claim 7, wherein the specific direction isa horizontal direction or a vertical direction.
 11. An image decodingmethod for decoding encoded data so as to form a decoded image, themethod comprising: a decoding step of decoding, from the encoded data,(i) an encode parameter including prediction mode information and (ii)prediction residual data; a first selecting step of selecting, from aplurality of prediction sets, one prediction set to be used with respectto each target block to be intra-predicted, wherein the prediction setincludes, as prediction mode candidates, a plurality of prediction modescorresponding to respective direction predictions, wherein each of theplurality of prediction sets includes the same number of the pluralityof prediction modes; a second selecting step of selecting one predictionmode from the plurality of prediction modes included in the predictionset selected by the first selecting step; a predicting step of forming,on the basis of the prediction mode thus selected, a predicted image ofthe each target block to be intra-predicted; and an adding step offorming a decoded image of the each target block to be intra-predictedby adding the predicted image formed in the prediction step and theprediction residual data obtained by decoding the encoded data.
 12. Theimage decoding method as set forth in claim 11, wherein predictiondirections of the respective plurality of prediction modes correspondingto the respective direction predictions are unevenly distributed with abias towards a specific direction.
 13. The image decoding method as setforth in claim 12, wherein a plurality of prediction sets are selectablewith respect to a predetermined reference region which is referred to bythe predicting step in order to form the predicted image of the eachtarget block to be intra predicted.
 14. The image decoding method as setforth in claim 13, wherein the predetermined reference region includesat least one of regions which are positioned on the left, on the upperleft, and on the top, respectively, of the each target block to beintra-predicted.
 15. The image decoding method as set forth in claim 12,wherein the specific direction is a horizontal direction or a verticaldirection.